Skip to content

Commit a89d68d

Browse files
cfriedtstephanosio
authored andcommitted
posix: sys/stat.h: move O_ACCMODE, RD WRONLY, RDWR to fcntl.h
Previously, `<sys/stat.h>` was declaring the following constants which should be declared in `<fcntl.h>` according to POSIX. Signed-off-by: Chris Friedt <[email protected]>
1 parent 194e610 commit a89d68d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

include/zephyr/posix/fcntl.h

+6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
#define O_CREAT 0x0200
1414
#endif
1515

16+
#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
17+
18+
#define O_RDONLY 00
19+
#define O_WRONLY 01
20+
#define O_RDWR 02
21+
1622
#define O_APPEND 0x0400
1723
#define O_EXCL 0x0800
1824
#define O_NONBLOCK 0x4000

0 commit comments

Comments
 (0)