From: Dmitry V. Levin Date: Fri, 28 Oct 2016 02:19:58 +0000 (+0000) Subject: Provide a safe definition of O_ACCMODE X-Git-Tag: v4.15~169 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9c260b9e87a032bc613e34b0e290bd7753c85a2a;p=strace 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. --- diff --git a/open.c b/open.c index 6128fb00..2944d55c 100644 --- a/open.c +++ b/open.c @@ -36,6 +36,10 @@ #include +/* 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