Provide a safe definition of O_ACCMODE

Some libcs e.g. musl are guilty of messing up with O_ACCMODE.

* open.c (O_ACCMODE): Redefine to 03.
This commit is contained in:
Дмитрий Левин 2016-10-28 02:19:58 +00:00 committed by Eugene Syromyatnikov
parent 0277a64986
commit 9c260b9e87

4
open.c
View File

@ -36,6 +36,10 @@
#include <fcntl.h>
/* some libcs are guilty of messing up with O_ACCMODE */
#undef O_ACCMODE
#define O_ACCMODE 03
#ifdef O_LARGEFILE
# if O_LARGEFILE == 0 /* biarch platforms in 64-bit mode */
# undef O_LARGEFILE