summaryrefslogtreecommitdiff
path: root/pidl/lib/Parse
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-02-25 16:54:35 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-02-25 16:54:35 +0100
commitd7c7b31bbaf110446ea835b66845ab6f0ee09231 (patch)
tree4ccc9d0be75b50e3212135729f282fb754b827c8 /pidl/lib/Parse
parentfd3f3e68f2e6be0196473f641f8edb41e40ca761 (diff)
downloadsamba-d7c7b31bbaf110446ea835b66845ab6f0ee09231.tar.gz
samba-d7c7b31bbaf110446ea835b66845ab6f0ee09231.tar.bz2
samba-d7c7b31bbaf110446ea835b66845ab6f0ee09231.zip
Only define _GNU_SOURCE if it's not defined yet.
Diffstat (limited to 'pidl/lib/Parse')
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
index f8209be654..f2a96a3037 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
@@ -131,7 +131,9 @@ sub Parse($$$$)
if (is_intree()) {
$res .= "#include \"includes.h\"\n";
} else {
+ $res .= "#ifndef _GNU_SOURCE\n";
$res .= "#define _GNU_SOURCE\n";
+ $res .= "#endif\n";
$res .= "#include <stdio.h>\n";
$res .= "#include <stdbool.h>\n";
$res .= "#include <stdlib.h>\n";