From 23f64242b4eb1e9f25d09fd1b4cf7ab715be01ce Mon Sep 17 00:00:00 2001 From: =?utf8?q?Eduard=20Vintil=C4=83?= Date: Sun, 9 Apr 2023 19:38:57 +0300 Subject: [PATCH] Add patch for O_ flags MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Adds a small patch which contains multiple Linux-specific O_* flags. Signed-off-by: Eduard Vintilă Reviewed-by: Maria Sfiraiala Reviewed-by: Teodor Tiron Approved-by: Razvan Deaconescu Tested-by: Unikraft CI GitHub-Closes: #28 --- .../0016-Add-Linux-specific-O_-flags.patch | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 patches/0016-Add-Linux-specific-O_-flags.patch diff --git a/patches/0016-Add-Linux-specific-O_-flags.patch b/patches/0016-Add-Linux-specific-O_-flags.patch new file mode 100644 index 0000000..4dbee77 --- /dev/null +++ b/patches/0016-Add-Linux-specific-O_-flags.patch @@ -0,0 +1,36 @@ +From 8e3fd0577d869b50f2df963331e92697dfbff64c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Eduard=20Vintil=C4=83?= +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ă +--- + 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 + -- 2.39.5