Only define _GNU_SOURCE if it's not defined yet.
[ira/wip.git] / pidl / lib / Parse / Pidl / Samba4 / NDR / Client.pm
index f8209be654b4134ddf06915cf082f70c22970231..f2a96a303778279d06dba71582d3318f674e9f8b 100644 (file)
@@ -131,7 +131,9 @@ sub Parse($$$$)
        if (is_intree()) {
                $res .= "#include \"includes.h\"\n";
        } else {
        if (is_intree()) {
                $res .= "#include \"includes.h\"\n";
        } else {
+               $res .= "#ifndef _GNU_SOURCE\n";
                $res .= "#define _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";
                $res .= "#include <stdio.h>\n";
                $res .= "#include <stdbool.h>\n";
                $res .= "#include <stdlib.h>\n";