gmain: Define _GNU_SOURCE before including glibconfig.h

As it pulls in unistd.h from something else.
This commit is contained in:
Emmanuele Bassi 2010-09-04 18:15:15 +01:00
parent ca7dee5949
commit 581e68b7d3

View File

@ -31,6 +31,11 @@
* MT safe * MT safe
*/ */
/* for pipe2; need to define it first to avoid
* other headers pulling in unistd.h
*/
#define _GNU_SOURCE
#include "config.h" #include "config.h"
#include "glibconfig.h" #include "glibconfig.h"
@ -47,8 +52,6 @@
#define G_MAIN_POLL_DEBUG #define G_MAIN_POLL_DEBUG
#endif #endif
#define _GNU_SOURCE /* for pipe2 */
#include <signal.h> #include <signal.h>
#include <sys/types.h> #include <sys/types.h>
#include <time.h> #include <time.h>