|
| 1 | +From 8020f4b3c1b347054174177aa5cc1cec0f0ed25e Mon Sep 17 00:00:00 2001 |
| 2 | +From: Kumar Gala < [email protected]> |
| 3 | +Date: Thu, 14 Feb 2019 23:34:19 -0600 |
| 4 | +Subject: [PATCH] sys/_default_fcntl.h: workaround arc nsim build issue |
| 5 | + |
| 6 | +If we are building newlib and have MISSING_SYSCALL_NAMES defined we run |
| 7 | +into an issue when libgloss/arc/nsim-syscalls.c tries to build. As |
| 8 | +MISSING_SYSCALL_NAMES will cause _open to become open, than we can a |
| 9 | +build conflict between how open is declared in sys/_default_fcntl.h and |
| 10 | +how its defined in nsim-syscalls.c. |
| 11 | + |
| 12 | +To workaround this we wrap the open declaration with |
| 13 | + #if !defined(MISSING_SYSCALL_NAMES) |
| 14 | + #endif |
| 15 | + |
| 16 | +Signed-off-by: Kumar Gala < [email protected]> |
| 17 | +--- |
| 18 | + newlib/libc/include/sys/_default_fcntl.h | 2 ++ |
| 19 | + 1 file changed, 2 insertions(+) |
| 20 | + |
| 21 | +diff --git a/newlib/libc/include/sys/_default_fcntl.h b/newlib/libc/include/sys/_default_fcntl.h |
| 22 | +index 22fa10688..9466cb1b8 100644 |
| 23 | +--- a/newlib/libc/include/sys/_default_fcntl.h |
| 24 | ++++ b/newlib/libc/include/sys/_default_fcntl.h |
| 25 | +@@ -205,7 +205,9 @@ struct eflock { |
| 26 | + #include <sys/types.h> |
| 27 | + #include <sys/stat.h> /* sigh. for the mode bits for open/creat */ |
| 28 | + |
| 29 | ++#if !defined(MISSING_SYSCALL_NAMES) |
| 30 | + extern int open (const char *, int, ...); |
| 31 | ++#endif |
| 32 | + #if __ATFILE_VISIBLE |
| 33 | + extern int openat (int, const char *, int, ...); |
| 34 | + #endif |
| 35 | +-- |
| 36 | +2.20.1 |
| 37 | + |
0 commit comments