]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix broken bootstrap on FreeBSD.
authorThomas Koenig <tkoenig@gcc.gnu.org>
Fri, 9 Jan 2026 21:00:07 +0000 (22:00 +0100)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Fri, 9 Jan 2026 21:03:21 +0000 (22:03 +0100)
commit0a98b1a6ac91cb1aa0f89f7dcdb9c35daa88c2a1
tree2461e2ff3162846ade41fa7228888f90d3ac06c4
parente153237a3f993475bb5b2e0758db6be9a005d5da
Fix broken bootstrap on FreeBSD.

As analyzed by Steve, on freebsd __gthread_t is a pointer type.
I thought it the cleanest solution to remove the #ifdef in gfc_unit,
make the "self" member a intptr_t and cast the return value of
__gthread_t to that type.

PR fortran/123512

libgfortran/ChangeLog:

* io/io.h: Change type of self to intptr_t.
* io/async.h (LOCK_UNIT): Cast __gthread_self () to intptr_t.
(TRYLOCK_UNIT): Likewise.
(OWN_THREAD_ID): Likewise.
libgfortran/io/async.h
libgfortran/io/io.h