https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105764
Bug ID: 105764 Summary: libgfortran fails to build with a custom thread model Product: gcc Version: 12.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran Assignee: unassigned at gcc dot gnu.org Reporter: lh_mouse at 126 dot com Target Milestone: --- Created attachment 53049 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53049&action=edit proposed patch Bootstrapping GCC with fortran enabled and a custom thread model can fail: ``` In file included from ../../../gcc/libgfortran/runtime/error.c:28: ../../../gcc/libgfortran/io/async.h:354:3: error: unknown type name 'pthread_t' 354 | pthread_t thread; | ^~~~~~~~~ ``` In commit a79878585a1c5e32bafbc6d1e73f91fd6e4293bf, `pthread_mutex_t` was replaced with `__gthread_mutex_t`, but `pthread_t` was left over. Not sure whether this was by design, or was an oversight. Patch also sent to gcc-patches: https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595754.html