]> xenbits.xensource.com Git - unikraft/libs/newlib.git/commitdiff
include: Add `*_OK` flags in fcntl.h header
authorStefan Jumarea <stefanjumarea02@gmail.com>
Thu, 11 May 2023 11:36:51 +0000 (14:36 +0300)
committerUnikraft <monkey@unikraft.io>
Thu, 11 May 2023 14:49:27 +0000 (14:49 +0000)
The `*_OK` flags are defined in `fcntl.h` in both musl and nolibc. Add
them here in newlib to prevent any eventual conflicts that may appear.

Signed-off-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Reviewed-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Approved-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #32

include/fcntl.h

index 90a1e5a185ec8caaaf8f0f471285c5e8ff45f163..f4c79261d12df442f3054f88d156b38f240acd6d 100644 (file)
@@ -6,6 +6,11 @@
 
 #include <uk/config.h>
 
+#define F_OK 0
+#define R_OK 4
+#define W_OK 2
+#define X_OK 1
+
 #if (defined CONFIG_ARCH_X86_64)
 #define O_NOFOLLOW  0400000
 #define O_DIRECTORY 0200000