Don't use SDL locking functions in our open()/close() hooks

Other shared library constructors can invoke open()/close() before
SDL2-compat's constructor runs to load SDL3 and populate the SDL3
function table. This causes SDL_AtomicLock()/SDL_AtomicUnlock()
to jump to 0.

See #1707
This commit is contained in:
Cameron Gutman
2025-10-09 20:03:19 -05:00
parent ae1c65805c
commit 490aa5082f
2 changed files with 15 additions and 10 deletions
+2
View File
@@ -9,7 +9,9 @@
// The specific kernel change required to run without root is:
// https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=45bc3d26c95a8fc63a7d8668ca9e57ef0883351c
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
// NOTE: This file MUST NOT include fcntl.h due to open() -> open64()
// redirection that happens when _FILE_OFFSET_BITS=64!