gccmacro: enable weakrefs only on ELF
authorLennart Poettering <lennart@poettering.net>
Tue, 15 Sep 2009 02:31:54 +0000 (04:31 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 15 Sep 2009 02:31:54 +0000 (04:31 +0200)
src/pulse/gccmacro.h

index e85ecb6..57e8050 100644 (file)
 #endif
 
 #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 */
 #define PA_GCC_WEAKREF(x) __attribute__((weakref(#x)));
 #endif