gccmacro: enable weakrefs only on ELF

This commit is contained in:
Lennart Poettering 2009-09-15 04:31:54 +02:00
parent 180ef1eebd
commit 12f211105e

View file

@ -118,7 +118,7 @@
#endif #endif
#ifndef PA_GCC_WEAKREF #ifndef PA_GCC_WEAKREF
#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ > 1)) || (__GNUC__ > 4)) #if defined(__GNUC__) && defined(__ELF__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ > 1)) || (__GNUC__ > 4))
/** Macro for usgae of GCC's weakref attribute */ /** Macro for usgae of GCC's weakref attribute */
#define PA_GCC_WEAKREF(x) __attribute__((weakref(#x))); #define PA_GCC_WEAKREF(x) __attribute__((weakref(#x)));
#endif #endif