aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test-O_DIRECTORY.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-02-18 12:24:24 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-02-18 12:24:24 +0000
commita09c2af4f8767c7cb3b4f490da5febe63d9fe552 (patch)
tree18f502a1bb05cea82c49f98cc99598480246e70b /test-O_DIRECTORY.c
parentd5f9d96f34d3bad7e78dad6e61178263dce65f34 (diff)
downloadmandoc-a09c2af4f8767c7cb3b4f490da5febe63d9fe552.tar.gz
mandoc-a09c2af4f8767c7cb3b4f490da5febe63d9fe552.tar.zst
mandoc-a09c2af4f8767c7cb3b4f490da5febe63d9fe552.zip
proper test for O_DIRECTORY
Diffstat (limited to 'test-O_DIRECTORY.c')
-rw-r--r--test-O_DIRECTORY.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test-O_DIRECTORY.c b/test-O_DIRECTORY.c
new file mode 100644
index 00000000..e44d51ca
--- /dev/null
+++ b/test-O_DIRECTORY.c
@@ -0,0 +1,7 @@
+#include <fcntl.h>
+
+int
+main(void)
+{
+ return open(".", O_RDONLY | O_DIRECTORY) == -1;
+}