summaryrefslogtreecommitdiff
path: root/glib/gqsort.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2011-05-01 11:17:14 -0400
committerDan Winship <danw@gnome.org>2011-05-03 07:07:41 -0400
commite56498ee0b1bdac0ad3c18a1f7bff83d4a5b1323 (patch)
treef694051988dc519d24a235444b96284e56904799 /glib/gqsort.c
parent33c0877adc681cb7cf8cf12afd94a9de8c869bf2 (diff)
downloadglib-e56498ee0b1bdac0ad3c18a1f7bff83d4a5b1323.tar.gz
Fix usage of _GNU_SOURCE
_GNU_SOURCE must be defined before including any other (system) header, so defining it in glib-unix.h (and hoping no one has included anything else before that) is wrong. And the "#define _USE_GNU" workaround for this problem in gnetworkingprivate.h is even wronger (and still prone to failure anyway due to single-include guards). Fix this by defining _GNU_SOURCE in config.h when building against glibc. In theory this is bad because new releases of glibc may include symbols that conflict with glib symbols, which could then cause compile failures. However, most people only see new releases of glibc when they upgrade their distro, at which point they also generally get new releases of gcc, which have new warnings/errors to clean up anyway. https://bugzilla.gnome.org/show_bug.cgi?id=649201
Diffstat (limited to 'glib/gqsort.c')
-rw-r--r--glib/gqsort.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/glib/gqsort.c b/glib/gqsort.c
index 03b2db929..db4bed21e 100644
--- a/glib/gqsort.c
+++ b/glib/gqsort.c
@@ -34,7 +34,6 @@
#include "config.h"
-#define _GNU_SOURCE
#include <limits.h>
#include <stdlib.h>
#include <string.h>