FS#13361: Fix some compilation under MacOS (Michael Landherr)

Change-Id: Id7e0576e355a1d71493fb7b277fd92f38b7edab4
This commit is contained in:
Solomon Peachy 2022-09-22 18:10:36 -04:00
parent 09cb3c7843
commit 9ed36ec22f
2 changed files with 11 additions and 2 deletions

View file

@ -711,6 +711,7 @@ Fabrice Bellard
Selami Dinçer Selami Dinçer
Matej Golian Matej Golian
James Le Cuirot James Le Cuirot
Michael Landherr
The libmad team The libmad team
The wavpack team The wavpack team

View file

@ -1078,8 +1078,16 @@ Lyre prototype 1 */
* only while main() runs), otherwise things may go wild, * only while main() runs), otherwise things may go wild,
* from crashes to freezes to exploding daps. * from crashes to freezes to exploding daps.
*/ */
#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 INIT_ATTR __attribute__ ((section(".init")))
#define INITDATA_ATTR __attribute__ ((section(".initdata"))) #define INITDATA_ATTR __attribute__ ((section(".initdata")))
#endif
#define HAVE_INIT_ATTR #define HAVE_INIT_ATTR
#else #else
#define INIT_ATTR #define INIT_ATTR