Commit 0ec572f0 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

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 <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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 39f4a913
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8,3 +8,4 @@ int main(void)
	free(get_current_dir_name());
	return 0;
}
#undef _GNU_SOURCE
+1 −0
Original line number Diff line number Diff line
@@ -7,3 +7,4 @@ int main(void)

	return 0;
}
#undef _GNU_SOURCE
+1 −0
Original line number Diff line number Diff line
@@ -5,3 +5,4 @@ int main(void)
{
	return setns(0, 0);
}
#undef _GNU_SOURCE