megadriver_stub.c: don't use _GNU_SOURCE to gate the compat code
authorJonathan Gray <jsg@jsg.id.au>
Tue, 18 Mar 2014 14:59:18 +0000 (01:59 +1100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sat, 5 Apr 2014 11:21:31 +0000 (12:21 +0100)
_GNU_SOURCE is only set/required for linux*|*-gnu*|gnu*) and as the
functionality is available on other systems check for RTLD_DEFAULT instead.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Cc: "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
src/mesa/drivers/dri/common/megadriver_stub.c

index a8217703dafdcb3e0d13963645a835e008f3318d..7b6d13450cc1ae01a39584103787e0adf361dc0c 100644 (file)
@@ -31,7 +31,7 @@
  * Dl_info, and RTLD_DEFAULT are only defined when _GNU_SOURCE is
  * defined.)
  */
-#ifdef _GNU_SOURCE
+#ifdef RTLD_DEFAULT
 
 #define MEGADRIVER_STUB_MAX_EXTENSIONS 10
 #define LIB_PATH_SUFFIX "_dri.so"
@@ -148,7 +148,7 @@ megadriver_stub_init(void)
    }
 }
 
-#endif /* _GNU_SOURCE */
+#endif /* RTLD_DEFAULT */
 
 static const
 __DRIconfig **stub_error_init_screen(__DRIscreen *psp)