about summary refs log tree commit diff
path: root/nq.c
diff options
context:
space:
mode:
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);