[Bug libc/34437] posix_spawn_file_actions_addchdir and posix_spawn_file_actions_addfchdir not available as exported symbols

"adhemerval.zanella at linaro dot org via Glibc-bugs" <[email protected]> Mon, 27 Jul 2026 12:15:47 +0000
Newsgroups gmane.comp.lib.glibc.bugs
Message-ID <[email protected]/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=3D34437

--- Comment #3 from Adhemerval Zanella <adhemerval.zanella at linaro dot or=
g> ---
(In reply to Bruno Haible from comment #0)
> Commit 7594b4e5a75d41e891782aa7e3fb51924f6840cb (committed on 2026-04-07)
> adds the functions posix_spawn_file_actions_addchdir and
> posix_spawn_file_actions_addfchdir, defined by POSIX:2024, through a
> modification of <spawn.h>.
>=20
> They are *not* exported at the linker level, from libc.so. In other words,
> they are missing from
> glibc-2.44/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist.
>=20
> This has the effect that the usual Autoconf test
> AC_CHECK_FUNCS([posix_spawn_file_actions_addchdir])
> or
> AC_CHECK_FUNCS([posix_spawn_file_actions_addfchdir])
> reports these functions as nonexistent in glibc 2.44.
>=20
> Each such symbol where AC_CHECK_FUNCS does not work causes extra trouble =
to
> developers (such as seen for 'strerror_r').
>=20
> Glibc has a proper mechanism for creating an alias name for an existing
> symbol at the linker level, such as seen for
> - sprintf and _IO_sprintf
> - pthread_getspecific and __pthread_getspecific
> - pthread_key_create and __pthread_key_create
> - free and cfree
> - obstack_free and _obstack_free
> - ffs and __ffs
> - memcmp and __memcmpeq
> - sysctl and __sysctl
> and so on. Why not use it here as well?

It saves us to export an additional symbol and I did not foresee that such
configure checks would fail, since they bypass the C headers and deliberate=
ly
redeclares the function with a bogus prototype.

This will add the additional constraint on exporting all extensions that are
ratified by POSIX as extra symbols, not ideal but doable.

Is this really a glibc bug?

>=20
> Originally reported by Xi Ruoyao <[email protected]> at
> https://lists.gnu.org/archive/html/bug-gnulib/2026-07/msg00164.html

--=20
You are receiving this mail because:
You are on the CC list for the bug.=