[PATCH v5 42/68] selftests/pidfd: Drop define _GNU_SOURCE
Edward Liaw
edliaw at google.com
Tue May 21 17:57:28 PDT 2024
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent
redefinition warnings.
Reviewed-by: John Hubbard <jhubbard at nvidia.com>
Reviewed-by: Muhammad Usama Anjum <usama.anjum at collabora.com>
Signed-off-by: Edward Liaw <edliaw at google.com>
---
tools/testing/selftests/pidfd/pidfd.h | 1 -
tools/testing/selftests/pidfd/pidfd_fdinfo_test.c | 2 --
tools/testing/selftests/pidfd/pidfd_getfd_test.c | 2 --
tools/testing/selftests/pidfd/pidfd_open_test.c | 2 --
tools/testing/selftests/pidfd/pidfd_poll_test.c | 2 --
tools/testing/selftests/pidfd/pidfd_setns_test.c | 2 --
tools/testing/selftests/pidfd/pidfd_test.c | 2 --
tools/testing/selftests/pidfd/pidfd_wait.c | 2 --
8 files changed, 15 deletions(-)
diff --git a/tools/testing/selftests/pidfd/pidfd.h b/tools/testing/selftests/pidfd/pidfd.h
index 88d6830ee004..e33177b1aa41 100644
--- a/tools/testing/selftests/pidfd/pidfd.h
+++ b/tools/testing/selftests/pidfd/pidfd.h
@@ -3,7 +3,6 @@
#ifndef __PIDFD_H
#define __PIDFD_H
-#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <sched.h>
diff --git a/tools/testing/selftests/pidfd/pidfd_fdinfo_test.c b/tools/testing/selftests/pidfd/pidfd_fdinfo_test.c
index f062a986e382..84135d75ece7 100644
--- a/tools/testing/selftests/pidfd/pidfd_fdinfo_test.c
+++ b/tools/testing/selftests/pidfd/pidfd_fdinfo_test.c
@@ -1,6 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
-
-#define _GNU_SOURCE
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
diff --git a/tools/testing/selftests/pidfd/pidfd_getfd_test.c b/tools/testing/selftests/pidfd/pidfd_getfd_test.c
index cd51d547b751..b6a0e9b3d2f5 100644
--- a/tools/testing/selftests/pidfd/pidfd_getfd_test.c
+++ b/tools/testing/selftests/pidfd/pidfd_getfd_test.c
@@ -1,6 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
-
-#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
diff --git a/tools/testing/selftests/pidfd/pidfd_open_test.c b/tools/testing/selftests/pidfd/pidfd_open_test.c
index c62564c264b1..f6735eca1dab 100644
--- a/tools/testing/selftests/pidfd/pidfd_open_test.c
+++ b/tools/testing/selftests/pidfd/pidfd_open_test.c
@@ -1,6 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
-
-#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
diff --git a/tools/testing/selftests/pidfd/pidfd_poll_test.c b/tools/testing/selftests/pidfd/pidfd_poll_test.c
index 55d74a50358f..83af8489c88e 100644
--- a/tools/testing/selftests/pidfd/pidfd_poll_test.c
+++ b/tools/testing/selftests/pidfd/pidfd_poll_test.c
@@ -1,6 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
-
-#define _GNU_SOURCE
#include <errno.h>
#include <linux/types.h>
#include <poll.h>
diff --git a/tools/testing/selftests/pidfd/pidfd_setns_test.c b/tools/testing/selftests/pidfd/pidfd_setns_test.c
index 47746b0c6acd..518051f0c3a1 100644
--- a/tools/testing/selftests/pidfd/pidfd_setns_test.c
+++ b/tools/testing/selftests/pidfd/pidfd_setns_test.c
@@ -1,6 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
-
-#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
diff --git a/tools/testing/selftests/pidfd/pidfd_test.c b/tools/testing/selftests/pidfd/pidfd_test.c
index 9faa686f90e4..53cce08a2202 100644
--- a/tools/testing/selftests/pidfd/pidfd_test.c
+++ b/tools/testing/selftests/pidfd/pidfd_test.c
@@ -1,6 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
-
-#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <linux/types.h>
diff --git a/tools/testing/selftests/pidfd/pidfd_wait.c b/tools/testing/selftests/pidfd/pidfd_wait.c
index 0dcb8365ddc3..54beba0983f1 100644
--- a/tools/testing/selftests/pidfd/pidfd_wait.c
+++ b/tools/testing/selftests/pidfd/pidfd_wait.c
@@ -1,6 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
-
-#define _GNU_SOURCE
#include <errno.h>
#include <linux/sched.h>
#include <linux/types.h>
--
2.45.1.288.g0e0cd299f1-goog
More information about the linux-riscv
mailing list