OSDN Git Service

tools feature: Undef _GNU_SOURCE at the end of feature tests
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 12 Feb 2019 12:56:57 +0000 (09:56 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 14 Feb 2019 16:31:11 +0000 (13:31 -0300)
Since we get all the tests in a single .c file for a first test,
tools/build/feature/test-all.c, if individual tests set that define and
fail to undef it at its end, then it the test-all.c build will fail due
to defining _GNU_SOURCE multiple times, getting us to the slow path,
so undef it at the end in tests that define it.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-w6s00jfo1xabgphzczadl59b@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/build/feature/test-get_current_dir_name.c
tools/build/feature/test-libpython.c
tools/build/feature/test-setns.c

index 573000f..c3c2016 100644 (file)
@@ -8,3 +8,4 @@ int main(void)
        free(get_current_dir_name());
        return 0;
 }
+#undef _GNU_SOURCE
index 0c1641b..371c911 100644 (file)
@@ -7,3 +7,4 @@ int main(void)
 
        return 0;
 }
+#undef _GNU_SOURCE
index 1f714d2..4a1581a 100644 (file)
@@ -5,3 +5,4 @@ int main(void)
 {
        return setns(0, 0);
 }
+#undef _GNU_SOURCE