lib: Ensure we use _GNU_SOURCE in enum templates
Due to the way glib-mkenums runs the preprocessor itself, it doesn't pick up the `AC_USE_SYSTEM_EXTENSIONS()` that we have in `configure.ac`. This blew up in an obscure way when I later wanted to `#include "libglnx.h"` in one of the headers, since it needs the `basename()` from `string.h` which is only available with `_GNU_SOURCE`. Closes: #616 Approved by: jlebon
This commit is contained in:
parent
a2d627352d
commit
099576ee4a
|
|
@ -18,9 +18,15 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
#endif
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
/*** END file-header ***/
|
/*** END file-header ***/
|
||||||
|
|
||||||
/*** BEGIN file-production ***/
|
/*** BEGIN file-production ***/
|
||||||
|
|
||||||
/* enumerations from "@filename@" */
|
/* enumerations from "@filename@" */
|
||||||
#include "@filename@"
|
#include "@filename@"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue