summaryrefslogtreecommitdiff
path: root/include/libc
diff options
context:
space:
mode:
authorbernard <[email protected]>2017-10-17 22:24:40 +0800
committerbernard <[email protected]>2017-10-17 22:24:40 +0800
commit947d8aa4d2d0742eb5ac1968406893f4e58a279b (patch)
treece258c48f23ae346a7245a28b14ab1989b1f9c64 /include/libc
parenta437ffbf3eed0f5da0a869b7b960a8f1218176d4 (diff)
[libc] Use correct header file for newlib.
Diffstat (limited to 'include/libc')
-rw-r--r--include/libc/libc_fcntl.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/libc/libc_fcntl.h b/include/libc/libc_fcntl.h
index 342e4ef5ce..6d6f8ee6d7 100644
--- a/include/libc/libc_fcntl.h
+++ b/include/libc/libc_fcntl.h
@@ -4,6 +4,14 @@
#ifndef LIBC_FCNTL_H__
#define LIBC_FCNTL_H__
+#ifdef RT_USING_NEWLIB
+#include <fcntl.h>
+
+#ifndef O_NONBLOCK
+#define O_NONBLOCK 04000
+#endif
+
+#else
#define O_RDONLY 00
#define O_WRONLY 01
#define O_RDWR 02
@@ -53,5 +61,7 @@
#define F_GETOWN_EX 16
#define F_GETOWNER_UIDS 17
+#endif
#endif
+