mirror of
https://github.com/darlinghq/darling.git
synced 2024-11-30 15:50:22 +00:00
libsyscall: Fix os_alloc_table not being exported in the static build
I had to re-apply the old fix that I accidentally removed when I updated libsyscall
This commit is contained in:
parent
884b195e31
commit
47f180dcca
@ -36,4 +36,10 @@ struct _os_alloc_once_s {
|
||||
|
||||
__attribute__((visibility("default")))
|
||||
extern struct _os_alloc_once_s _os_alloc_once_table[];
|
||||
#ifdef DARLING
|
||||
// for some reason, the linker doesn't see uninitialized symbols in static libraries
|
||||
// so we need to initialize this so dyld can use it
|
||||
struct _os_alloc_once_s _os_alloc_once_table[OS_ALLOC_ONCE_KEY_MAX] = { 0 };
|
||||
#else
|
||||
struct _os_alloc_once_s _os_alloc_once_table[OS_ALLOC_ONCE_KEY_MAX];
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user