From: Maria Sfiraiala Date: Wed, 3 Aug 2022 15:59:43 +0000 (+0300) Subject: Define O_DIRECTORY with different value X-Git-Tag: RELEASE-0.12.0^0 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=dea6ac34da547c9ea5831ed4f6044669259285b4;p=unikraft%2Flibs%2Fnewlib.git Define O_DIRECTORY with different value 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 Reviewed-by: Sergiu Moga Reviewed-by: Simon Kuenzer Reviewed-by: Razvan Deaconescu Approved-by: Razvan Deaconescu Tested-by: Unikraft CI GitHub-Closes: #21 --- diff --git a/include/fcntl.h b/include/fcntl.h index 367c1e6..90a1e5a 100644 --- a/include/fcntl.h +++ b/include/fcntl.h @@ -15,10 +15,8 @@ #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