]> xenbits.xensource.com Git - unikraft/libs/newlib.git/commitdiff
Define O_DIRECTORY with different value RELEASE-0.12.0
authorMaria Sfiraiala <maria.sfiraiala@gmail.com>
Wed, 3 Aug 2022 15:59:43 +0000 (18:59 +0300)
committerUnikraft <monkey@unikraft.io>
Wed, 16 Nov 2022 17:23:52 +0000 (17:23 +0000)
Previous fix regarding confusion between O_NONBLOCK and O_DIRECTORY
values changed O_NONBLOCK to a different number, therefore it drifted
away from FNONBLOCK (for which it was an alias) and caused a blocking
socket.

This commit simply changes the value of O_DIRECTORY, without being
necessary to redefine O_NONBLOCK or FNONBLOCK.

Fixes: 58f9f3a3f7b5 ("include/fcntl.h: Replace O_NONBLOCK with new one
on arm")

Signed-off-by: Maria Sfiraiala <maria.sfiraiala@gmail.com>
Reviewed-by: Sergiu Moga <sergiu.moga@protonmail.com>
Reviewed-by: Simon Kuenzer <simon@unikraft.io>
Reviewed-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Approved-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #21

include/fcntl.h

index 367c1e60fd97494c4908bf16c30f00873e58739e..90a1e5a185ec8caaaf8f0f471285c5e8ff45f163 100644 (file)
 #define O_DIRECT     040000
 #define O_NOATIME  01000000
 #elif ((defined CONFIG_ARCH_ARM_64) || (defined CONFIG_ARCH_ARM_32))
-#undef O_NONBLOCK
-#define O_NONBLOCK    04000
 #define O_NOFOLLOW  0100000
-#define O_DIRECTORY  040000
+#define O_DIRECTORY 0400000000
 #define O_CLOEXEC  02000000
 #define O_DSYNC      010000
 #define O_ASYNC      020000