diff --git a/glib/gmain.c b/glib/gmain.c index 933c04f26..78de717bf 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 #include #include