]> xenbits.xensource.com Git - unikraft/libs/newlib.git/commitdiff
Update fcntl() related definitions
authorCostin Lupu <costin.lupu@cs.pub.ro>
Wed, 4 Sep 2019 14:59:36 +0000 (17:59 +0300)
committerCostin Lupu <costin.lupu@cs.pub.ro>
Wed, 4 Sep 2019 16:30:15 +0000 (19:30 +0300)
Since we are using the fcntl() implementation in vfscore, we don't use newlib's
any more. This patch also adds some flags that are needed by fcntl() and that
were copied from musl, just like the previous ones from fcntl.h.

Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
Reviewed-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@stud.acs.upb.ro>
Makefile.uk
include/fcntl.h

index c02c2f0d30e94220eb68dac59677923bae7a6fbf..01da724361f1bcc4664454db728dd5c22bfb63ce 100644 (file)
@@ -792,7 +792,7 @@ LIBNEWLIBC_SRCS-y += $(LIBNEWLIB_LIBC)/string/wcsdup.c
 ################################################################################
 # Newlib/libc code -- syscalls
 ################################################################################
-LIBNEWLIBC_SRCS-y += $(LIBNEWLIB_LIBC)/syscalls/sysfcntl.c
+#LIBNEWLIBC_SRCS-y += $(LIBNEWLIB_LIBC)/syscalls/sysfcntl.c
 
 ################################################################################
 # Newlib/libc code -- time
index 25a4808b7e0a4eb8cd7e2890c28028520209b583..7a35052986221f23992ed0ecc09635c9164a747f 100644 (file)
 #define O_DIRECTORY 0200000
 #define O_CLOEXEC  02000000
 #define O_DSYNC      010000
-#endif
-
-#if ((defined CONFIG_ARCH_ARM_64) || (defined CONFIG_ARCH_ARM_32))
+#define O_ASYNC      020000
+#define O_DIRECT     040000
+#define O_NOATIME  01000000
+#elif ((defined CONFIG_ARCH_ARM_64) || (defined CONFIG_ARCH_ARM_32))
 #define O_NOFOLLOW  0100000
 #define O_DIRECTORY  040000
 #define O_CLOEXEC  02000000
 #define O_DSYNC      010000
+#define O_ASYNC      020000
+#define O_DIRECT    0200000
+#define O_NOATIME  01000000
 #endif
 
+#define FIONBIO      0x5421
+#define FIOASYNC     0x5452
+
 
 /* Glibc does not provide KEEP_SIZE and PUNCH_HOLE anymore. Instead it
  * includes linux/falloc.h.