summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPeng Hao <peng.hao2@zte.com.cn>2018-10-11 22:53:50 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-01 11:17:00 +0300
commit51aa1a10fbac2faabcee67b882ca5bf8129cb1bb (patch)
tree340430a6551e7f5da665bb43ad16edfcf4ba5367 /tools
parentc62be4108883a7aee896e4e1417a1e00cf0bb89a (diff)
downloadlinux-51aa1a10fbac2faabcee67b882ca5bf8129cb1bb.tar.xz
selftests: fix warning: "_GNU_SOURCE" redefined
[ Upstream commit 0387662d1b6c5ad2950d8e94d5e380af3f15c05c ] Makefile contains -D_GNU_SOURCE. remove define "_GNU_SOURCE" in c files. Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/proc/fd-001-lookup.c2
-rw-r--r--tools/testing/selftests/proc/fd-003-kthread.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/proc/fd-001-lookup.c b/tools/testing/selftests/proc/fd-001-lookup.c
index a2010dfb2110..60d7948e7124 100644
--- a/tools/testing/selftests/proc/fd-001-lookup.c
+++ b/tools/testing/selftests/proc/fd-001-lookup.c
@@ -14,7 +14,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
// Test /proc/*/fd lookup.
-#define _GNU_SOURCE
+
#undef NDEBUG
#include <assert.h>
#include <dirent.h>
diff --git a/tools/testing/selftests/proc/fd-003-kthread.c b/tools/testing/selftests/proc/fd-003-kthread.c
index 1d659d55368c..dc591f97b63d 100644
--- a/tools/testing/selftests/proc/fd-003-kthread.c
+++ b/tools/testing/selftests/proc/fd-003-kthread.c
@@ -14,7 +14,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
// Test that /proc/$KERNEL_THREAD/fd/ is empty.
-#define _GNU_SOURCE
+
#undef NDEBUG
#include <sys/syscall.h>
#include <assert.h>