summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorAndrew G. Morgan <morgan@kernel.org>2020-06-04 21:44:09 -0700
committerAndrew G. Morgan <morgan@kernel.org>2020-06-04 21:44:09 -0700
commit0fe06e751a5d7bd532cb0762bed5a9e87e224bcc (patch)
tree194344d257b6f52194b99eff965a295448623c76 /progs
parente4488cac31347efd6d9f785a8fdef7167560f3b6 (diff)
downloadlibcap2-0fe06e751a5d7bd532cb0762bed5a9e87e224bcc.tar.gz
Better protect some header #define's.
Apparently some folk like to supply these defines on the compiler command line. Protect these defines with some more macrology. Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Diffstat (limited to 'progs')
-rw-r--r--progs/capsh.c2
-rw-r--r--progs/getcap.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/progs/capsh.c b/progs/capsh.c
index b9f3665..94bf57d 100644
--- a/progs/capsh.c
+++ b/progs/capsh.c
@@ -9,7 +9,9 @@
* capability manipulations work as expected (or not).
*/
+#ifndef _DEFAULT_SOURCE
#define _DEFAULT_SOURCE
+#endif
#include <stdio.h>
#include <string.h>
diff --git a/progs/getcap.c b/progs/getcap.c
index 211bb31..225207f 100644
--- a/progs/getcap.c
+++ b/progs/getcap.c
@@ -4,6 +4,7 @@
* This displays the capabilities of a given file.
*/
+#undef _XOPEN_SOURCE
#define _XOPEN_SOURCE 500
#include <errno.h>