Skip to contentSkip to conversation

selftests: execveat: Fix _GNU_SOURCE redefined build warn

PATCH Superseded Shuah Khan 1 participant 1 message Sep 24, 2019

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Shuah Khan

author maintainer
#0 lore raw

PATCH 1/1 selftests: execveat: Fix _GNU_SOURCE redefined build warn

Fix the following _GNU_SOURCE redefined build warn:

execveat.c:8: warning: "_GNU_SOURCE" redefined

---
 tools/testing/selftests/exec/execveat.c | 2 ++
 1 file changed, 2 insertions(+)
tools/testing/selftests/exec/execveat.c +2 -0
index cbb6efbdb786..045a3794792a 100644
@@ -5,7 +5,9 @@
  * Selftests for execveat(2).
  */
 
+#ifndef _GNU_SOURCE
 #define _GNU_SOURCE  /* to get O_PATH, AT_EMPTY_PATH */
+#endif
 #include <sys/sendfile.h>
 #include <sys/stat.h>
 #include <sys/syscall.h>
Signature · 1 line
2.20.1