commit | 98411c0d338933e75221cc9c25bf3d5b9ec977b9 | [log] [tgz] |
---|---|---|
author | Chris Mumford <cmumford@google.com> | Tue Jul 05 06:52:04 2022 -0700 |
committer | Sam Lantinga <slouken@libsdl.org> | Tue Jul 05 07:50:57 2022 -0700 |
tree | c7d40a33c6c6d73ff0954a616d5897a1289e7813 | |
parent | 6187edd41e318f9c434ba178fb32a8ef2b07e5da [diff] |
Added include: libkern/OSAtomic.h When building on macOS without gcc (e.g. clang) where HAVE_GCC_ATOMICS is not defined, `SDL_AtomicTryLock` will call `OSAtomicCompareAndSwap32Barrier` which is not yet declared. Including OSAtomic.h on OSX resolves this error/warning: SDL_spinlock.c:125:12: error: implicit declaration of function 'OSAtomicCompareAndSwap32Barrier' is invalid in C99 [-Werror,-Wimplicit-function-declaration] return OSAtomicCompareAndSwap32Barrier(0, 1, lock); This was reported in issue #3885 but marked Invalid and closed - possibly because the default CMake build uses gcc instead of clang.
Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. It is used by video playback software, emulators, and popular games including Valve's award winning catalog and many Humble Bundle games.
More extensive documentation is available in the docs directory, starting with README.md
Enjoy!
Sam Lantinga (slouken@libsdl.org)