]> xenbits.xensource.com Git - unikraft/libs/newlib.git/commitdiff
Add patch for O_ flags
authorEduard Vintilă <eduard.vintila47@gmail.com>
Sun, 9 Apr 2023 16:38:57 +0000 (19:38 +0300)
committerUnikraft <monkey@unikraft.io>
Mon, 8 May 2023 10:10:15 +0000 (10:10 +0000)
Adds a small patch which contains multiple Linux-specific O_* flags.

Signed-off-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Reviewed-by: Maria Sfiraiala <maria.sfiraiala@gmail.com>
Reviewed-by: Teodor Tiron <teotiron@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #28

patches/0016-Add-Linux-specific-O_-flags.patch [new file with mode: 0644]

diff --git a/patches/0016-Add-Linux-specific-O_-flags.patch b/patches/0016-Add-Linux-specific-O_-flags.patch
new file mode 100644 (file)
index 0000000..4dbee77
--- /dev/null
@@ -0,0 +1,36 @@
+From 8e3fd0577d869b50f2df963331e92697dfbff64c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Eduard=20Vintil=C4=83?= <eduard.vintila47@gmail.com>
+Date: Sun, 9 Apr 2023 19:32:32 +0300
+Subject: [PATCH] Add Linux specific O_* flags
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Eduard Vintilă <eduard.vintila47@gmail.com>
+---
+ newlib/libc/include/sys/_default_fcntl.h | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/newlib/libc/include/sys/_default_fcntl.h b/newlib/libc/include/sys/_default_fcntl.h
+index ede90c4..5d22692 100644
+--- a/newlib/libc/include/sys/_default_fcntl.h
++++ b/newlib/libc/include/sys/_default_fcntl.h
+@@ -43,6 +43,15 @@ extern "C" {
+ /*    O_NDELAY        _FNBIO          set in include/fcntl.h */
+ #define       O_NONBLOCK      _FNONBLOCK
+ #define       O_NOCTTY        _FNOCTTY
++
++
++#define O_ASYNC      020000
++#define O_DIRECT     040000
++#define O_LARGEFILE       0
++#define O_NOATIME  01000000
++#define O_PATH    010000000
++#define O_TMPFILE 020200000
++#define O_NDELAY O_NONBLOCK
+ /* For machines which care - */
+ #if defined (__CYGWIN__)
+ #define _FBINARY        0x10000
+-- 
+2.40.0
+