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:
Colin Walters authored and Atomic Bot committed 2016-12-07 23:00:58 +00:00
1 parent a2d627352d
commit 099576ee4a
1 file changed
+6
@@ -18,9 +18,15 @@
* Boston, MA 02111-1307, USA.
*/
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <string.h>
/*** END file-header ***/
/*** BEGIN file-production ***/
/* enumerations from "@filename@" */
#include "@filename@"