psp: add a patch for GCC 4.7.4
[rofl0r-mmix-cross.git] / patches / newlib-1.20.0-fcntl.diff
blob7007035586853d31476bb80eae2335764cd91212
1 From 60f1cc7e2414d133fc52a985fe959ddee4389e30 Mon Sep 17 00:00:00 2001
2 From: rofl0r <rofl0r@users.noreply.github.com>
3 Date: Wed, 16 Mar 2022 22:40:12 +0000
4 Subject: [PATCH] add couple flags to fcntl.h
6 taken from newlib 4.1
7 ---
8 newlib/libc/include/sys/_default_fcntl.h | 10 ++++++++++
9 1 file changed, 10 insertions(+)
11 diff --git a/newlib/libc/include/sys/_default_fcntl.h b/newlib/libc/include/sys/_default_fcntl.h
12 index 1884136..2aa3ff4 100644
13 --- a/newlib/libc/include/sys/_default_fcntl.h
14 +++ b/newlib/libc/include/sys/_default_fcntl.h
15 @@ -22,6 +22,12 @@ extern "C" {
16 #define _FNONBLOCK 0x4000 /* non blocking I/O (POSIX style) */
17 #define _FNDELAY _FNONBLOCK /* non blocking I/O (4.2 style) */
18 #define _FNOCTTY 0x8000 /* don't assign a ctty on this open */
19 +#define _FNOINHERIT 0x40000
20 +#define _FDIRECT 0x80000
21 +#define _FNOFOLLOW 0x100000
22 +#define _FDIRECTORY 0x200000
23 +#define _FEXECSRCH 0x400000
26 #define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
28 @@ -53,6 +59,10 @@ extern "C" {
29 #define O_NOINHERIT _FNOINHERIT
30 /* O_CLOEXEC is the Linux equivalent to O_NOINHERIT */
31 #define O_CLOEXEC _FNOINHERIT
32 +#define O_NOFOLLOW _FNOFOLLOW
33 +#define O_DIRECTORY _FDIRECTORY
34 +#define O_EXEC _FEXECSRCH
35 +#define O_SEARCH _FEXECSRCH
37 /* The windows header files define versions with a leading underscore. */
38 #define _O_RDONLY O_RDONLY
39 --
40 2.25.0