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