Only define _GNU_SOURCE if it's not defined yet.
authorJelmer Vernooij <jelmer@samba.org>
Wed, 25 Feb 2009 15:54:35 +0000 (16:54 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 25 Feb 2009 15:54:35 +0000 (16:54 +0100)
pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm

index f8209be..f2a96a3 100644 (file)
@@ -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";