_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Reviewed-by: John Hubbard <jhubbard@xxxxxxxxxx> Reviewed-by: Muhammad Usama Anjum <usama.anjum@xxxxxxxxxxxxx> Signed-off-by: Edward Liaw <edliaw@xxxxxxxxxx> --- tools/testing/selftests/memfd/common.c | 1 - tools/testing/selftests/memfd/fuse_test.c | 2 -- tools/testing/selftests/memfd/memfd_test.c | 1 - 3 files changed, 4 deletions(-) diff --git a/tools/testing/selftests/memfd/common.c b/tools/testing/selftests/memfd/common.c index 8eb3d75f6e60..879d4f4c66fa 100644 --- a/tools/testing/selftests/memfd/common.c +++ b/tools/testing/selftests/memfd/common.c @@ -1,5 +1,4 @@ // SPDX-License-Identifier: GPL-2.0 -#define _GNU_SOURCE #define __EXPORTED_HEADERS__ #include <stdio.h> diff --git a/tools/testing/selftests/memfd/fuse_test.c b/tools/testing/selftests/memfd/fuse_test.c index dbc171a3806d..e35c6909f0bb 100644 --- a/tools/testing/selftests/memfd/fuse_test.c +++ b/tools/testing/selftests/memfd/fuse_test.c @@ -12,8 +12,6 @@ * the read() syscall with our memory-mapped memfd object as receive buffer to * force the kernel to write into our memfd object. */ - -#define _GNU_SOURCE #define __EXPORTED_HEADERS__ #include <errno.h> diff --git a/tools/testing/selftests/memfd/memfd_test.c b/tools/testing/selftests/memfd/memfd_test.c index 95af2d78fd31..ee019b57bb98 100644 --- a/tools/testing/selftests/memfd/memfd_test.c +++ b/tools/testing/selftests/memfd/memfd_test.c @@ -1,5 +1,4 @@ // SPDX-License-Identifier: GPL-2.0 -#define _GNU_SOURCE #define __EXPORTED_HEADERS__ #include <errno.h> -- 2.45.0.118.g7fe29c98d7-goog