diff options
Diffstat (limited to 'firmware/export/config.h')
-rw-r--r-- | firmware/export/config.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/firmware/export/config.h b/firmware/export/config.h index 5cb89ed15a..2519b87f0d 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h @@ -1078,8 +1078,16 @@ Lyre prototype 1 */ * only while main() runs), otherwise things may go wild, * from crashes to freezes to exploding daps. */ -#define INIT_ATTR __attribute__ ((section(".init"))) -#define INITDATA_ATTR __attribute__ ((section(".initdata"))) + + +#if defined(__APPLE__) && defined(__MACH__) + #define INIT_ATTR __attribute__((section ("__INIT,.init"))) + #define INITDATA_ATTR __attribute__((section ("__INITDATA,.initdata"))) +#else + #define INIT_ATTR __attribute__ ((section(".init"))) + #define INITDATA_ATTR __attribute__ ((section(".initdata"))) +#endif + #define HAVE_INIT_ATTR #else #define INIT_ATTR |