about summary refs log tree commit diff
path: root/nq.c
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-03-21 15:29:13 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2016-03-21 15:29:13 +0100
commitd6c8f4fee8392620dd7c33dc8e94ff1d84455633 (patch)
tree4c15f3964bf225ea7f980c5a692b2659b4de7c00 /nq.c
parentd6c2acd2902dd75e50d5d7a08f3708fa78f2eb43 (diff)
downloadnq-d6c8f4fee8392620dd7c33dc8e94ff1d84455633.tar.gz
nq-d6c8f4fee8392620dd7c33dc8e94ff1d84455633.tar.xz
nq-d6c8f4fee8392620dd7c33dc8e94ff1d84455633.zip
nq, fq: fall back on when O_DIRECTORY is not defined
Diffstat (limited to 'nq.c')
-rw-r--r--nq.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/nq.c b/nq.c
index 04223bd..67e3485 100644
--- a/nq.c
+++ b/nq.c
@@ -121,7 +121,11 @@ usage:
 		}
 	}
 
+#ifdef O_DIRECTORY
 	dirfd = open(path, O_RDONLY | O_DIRECTORY);
+#else
+	dirfd = open(path, O_RDONLY);
+#endif
 	if (dirfd < 0) {
 		perror("dir open");
 		exit(111);