From 918ed39f0969caa1f92ba09c0c33952b6cd02eb8 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 23 Aug 2012 04:19:59 +0000 Subject: * libc/stdio/flags.c (__sflags): Guard against using O_BINARY on systems which do not provide it. --- newlib/libc/stdio/flags.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'newlib/libc/stdio/flags.c') diff --git a/newlib/libc/stdio/flags.c b/newlib/libc/stdio/flags.c index b2e4d1666..518cc33f1 100644 --- a/newlib/libc/stdio/flags.c +++ b/newlib/libc/stdio/flags.c @@ -69,7 +69,9 @@ _DEFUN(__sflags, (ptr, mode, optr), m = (m & ~O_ACCMODE) | O_RDWR; break; case 'b': +#ifdef O_BINARY m |= O_BINARY; +#endif break; #ifdef __CYGWIN__ case 't': -- cgit v1.2.3