[glib] gmain: Define _GNU_SOURCE before including glibconfig.h
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gmain: Define _GNU_SOURCE before including glibconfig.h
- Date: Sat, 4 Sep 2010 17:16:10 +0000 (UTC)
commit 581e68b7d3f57654d881cea6de7bdfabae62e368
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Sat Sep 4 18:15:15 2010 +0100
gmain: Define _GNU_SOURCE before including glibconfig.h
As it pulls in unistd.h from something else.
glib/gmain.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/glib/gmain.c b/glib/gmain.c
index 933c04f..78de717 100644
--- a/glib/gmain.c
+++ b/glib/gmain.c
@@ -31,6 +31,11 @@
* MT safe
*/
+/* for pipe2; need to define it first to avoid
+ * other headers pulling in unistd.h
+ */
+#define _GNU_SOURCE
+
#include "config.h"
#include "glibconfig.h"
@@ -47,8 +52,6 @@
#define G_MAIN_POLL_DEBUG
#endif
-#define _GNU_SOURCE /* for pipe2 */
-
#include <signal.h>
#include <sys/types.h>
#include <time.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]