aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-04-15 21:59:42 -0500
committerRob Landley <rob@landley.net>2014-04-15 21:59:42 -0500
commit15027d6de049fa139a193abc5a86e6578faf630d (patch)
tree04f956c68b136f2968d80f78640d3db8ab1253a8 /lib
parentdd61393cba9d4dd7152960274aff1d25dd239c93 (diff)
downloadtoybox-15027d6de049fa139a193abc5a86e6578faf630d.tar.gz
Probes for O_NOFOLLOW that compile and run something aren't compatible with cross compiling, so just #define it to 0 if it's not in fcntl.h where posix-2008 says.
Diffstat (limited to 'lib')
-rw-r--r--lib/portability.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/portability.h b/lib/portability.h
index 3b1cdf70..099f3215 100644
--- a/lib/portability.h
+++ b/lib/portability.h
@@ -158,5 +158,8 @@ ssize_t getline(char **lineptr, size_t *n, FILE *stream);
#include <sys/mount.h>
#include <sys/swap.h>
-// compile time probes for stuff libc didn't provide
-#include "generated/portability.h"
+// Some systems don't define O_NOFOLLOW, and it varies by architecture, so...
+#include <fcntl.h>
+#ifndef O_NOFOLLOW
+#define O_NOFOLLOW 0
+#endif