tools feature: Undef _GNU_SOURCE at the end of feature tests
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 0ec572f05721f430cf8470595da8c3d5e25567de Gitweb: https://git.kernel.org/tip/0ec572f05721f430cf8470595da8c3d5e25567de Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Tue, 12 Feb 2019 09:56:57 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Thu, 14 Feb 2019 13:31:11 -0300
tools feature: Undef _GNU_SOURCE at the end of feature tests
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 <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/build/feature/test-get_current_dir_name.c | 1 + tools/build/feature/test-libpython.c | 1 + tools/build/feature/test-setns.c | 1 + 3 files changed, 3 insertions(+)
tools/build/feature/test-get_current_dir_name.c +1 -0
@@ -8,3 +8,4 @@ int main(void)free (get_current_dir_name ());return 0 ; } +#undef _GNU_SOURCE
tools/build/feature/test-libpython.c +1 -0
@@ -7,3 +7,4 @@ int main(void)return 0 ; } +#undef _GNU_SOURCE
tools/build/feature/test-setns.c +1 -0
@@ -5,3 +5,4 @@ int main(void) {return setns (0 ,0 ); } +#undef _GNU_SOURCE