Skip to content

fix(compat.sdl3): addchdir by its _np name alone, for a system glibc before 2.40 (revision 3) - #854

Merged
Sunrisepeak merged 1 commit into
mainfrom
compat-sdl3-addchdir-np
Nov 20, 2026
Merged

Sunrisepeak merged 1 commit into
mainfrom
compat-sdl3-addchdir-np

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

compat.sdl3 3.4.18's generated SDL_build_config.h defines both HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR and HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP. The plain posix_spawn_file_actions_addchdir is glibc 2.40's, so a build against an older system C library stops in SDL_posixprocess.c:

SDL_posixprocess.c:215:13: error: implicit declaration of function 'posix_spawn_file_actions_addchdir'; did you mean 'posix_spawn_file_actions_addchdir_np'?

(mcpp build --sysroot glibc@system --profile release of a windowed omui application on Ubuntu 24.04, glibc 2.39: every other package compiles.)

With _NP alone, SDL_posixprocess.c maps the call to posix_spawn_file_actions_addchdir_np itself — glibc since 2.29, musl since 1.1.24, and the toolchain's glibc 2.44 has it too — so the default build behaves as before.

  • pkgs/c/compat.sdl3.lua: the define kept as /* #undef … */ with the reason; revision 3, floor 3 for 3.4.18.

Not verified end to end against glibc 2.39 here: the build read the already-installed payload's generated config; that build follows this revision's release.

…before 2.40 (revision 3)

The generated SDL_build_config.h defined both HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR and
HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP. The plain posix_spawn_file_actions_addchdir is
glibc 2.40's; built against an older system C library (mcpp build --sysroot glibc@system on
Ubuntu 24.04, glibc 2.39) SDL_posixprocess.c stops on its implicit declaration, and SDL3 is
the only package of a windowed omui application that does.

With the _NP define alone, SDL_posixprocess.c maps the call to
posix_spawn_file_actions_addchdir_np itself — glibc since 2.29, musl since 1.1.24, and the
toolchain's glibc 2.44 still has it — so the default build is unchanged in what it does.
Revision 3, floor 3 for 3.4.18.
@Sunrisepeak
Sunrisepeak merged commit ee3ad26 into main Nov 20, 2026
19 checks passed
@Sunrisepeak
Sunrisepeak deleted the compat-sdl3-addchdir-np branch November 20, 2026 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant