--- a/src/common.h
+++ b/src/common.h
@@ -25,6 +25,1 @@
-#ifdef O_ACCMODE
-# define O_NOACCESS O_ACCMODE
-#else
-/* open a file for "no access" */
-# define O_NOACCESS 3
-#endif
+#define O_NOACCESS O_RDONLY
