Don't define _GNU_SOURCE if it's already defined on the command-line.
authorJelmer Vernooij <jelmer@samba.org>
Wed, 25 Feb 2009 14:05:43 +0000 (15:05 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 25 Feb 2009 14:05:43 +0000 (15:05 +0100)
pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm

index af6885f..0e4a7e2 100644 (file)
@@ -2548,7 +2548,9 @@ sub GenerateIncludes($)
        if (is_intree()) {
                $self->pidl("#include \"includes.h\"");
        } else {
+               $self->pidl("#ifndef _GNU_SOURCE");
                $self->pidl("#define _GNU_SOURCE");
+               $self->pidl("#endif");
                $self->pidl("#include <stdint.h>");
                $self->pidl("#include <stdlib.h>");
                $self->pidl("#include <stdio.h>");