qulogic/libgnt

Fix gntwm.c compile on some platforms.
v2.10.0 v2.8.0 v2.9.0
2011-06-06, Ethan Blanton
cbc7d4ce26d2
Fix gntwm.c compile on some platforms.

Fixes #14250
  • +8 -3
    gntwm.c
  • --- a/gntwm.c Thu May 05 06:22:20 2011 +0000
    +++ b/gntwm.c Mon Jun 06 16:25:21 2011 +0000
    @@ -24,12 +24,17 @@
    #ifdef USE_PYTHON
    #include <Python.h>
    -#else
    +#endif
    +
    +/* Python.h may define _GNU_SOURCE and _XOPEN_SOURCE_EXTENDED, so protect
    + * these checks with #ifndef/!defined() */
    +#ifndef _GNU_SOURCE
    #define _GNU_SOURCE
    -#if (defined(__APPLE__) || defined(__unix__)) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
    +#endif
    +
    +#if !defined _XOPEN_SOURCE_EXTENDED && (defined(__APPLE__) || defined(__unix__)) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
    #define _XOPEN_SOURCE_EXTENDED
    #endif
    -#endif
    #include <glib.h>
    #if GLIB_CHECK_VERSION(2,6,0)