Currently, OpenSLP fails to build on arm64 macOS (Apple Silicon) due to atomics code. The preprocessor will pick the Apple Atomics conditional:
|
#elif defined(__APPLE__) |
|
# define USE_APPLE_ATOMICS |
Which first fails due to missing #include <libkern/OSAtomic.h> and then fails due to undefined o at
|
while (!OSAtomicCompareAndSwap32(o, n, (int32_t *)pn)); |
Also may need to look into behavior of 32-bit casts on arm64.
A temporary workaround is to not use Apple Atomics on arm64 macOS and build with fallback.
Fixing above issues for arm64 macOS could work but Apple has deprecated these functions so they may be removed in a future release.
Ideally adding support for a modern option like C11 atomics could be more useful.
Currently, OpenSLP fails to build on arm64 macOS (Apple Silicon) due to atomics code. The preprocessor will pick the Apple Atomics conditional:
openslp/openslp/common/slp_atomic.c
Lines 213 to 214 in 1bc8dad
Which first fails due to missing
#include <libkern/OSAtomic.h>and then fails due to undefinedoatopenslp/openslp/common/slp_atomic.c
Line 349 in 1bc8dad
Also may need to look into behavior of 32-bit casts on arm64.
A temporary workaround is to not use Apple Atomics on arm64 macOS and build with fallback.
Fixing above issues for arm64 macOS could work but Apple has deprecated these functions so they may be removed in a future release.
Ideally adding support for a modern option like C11 atomics could be more useful.