Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Law <jeffreyalaw@gmail.com>2023-12-23 07:29:56 +0300
committerJeff Law <jeffreyalaw@gmail.com>2023-12-23 07:29:56 +0300
commit1df8f9f09b0999e04bc0bbd7170ac7dbfa278213 (patch)
tree1f557a935ceb5675ae2625f527170cbb2d88266e /libgloss/epiphany/lseek.c
parent5e79655f380488eb99dd9cc39c30d7c2927fd998 (diff)
Fix epiphany libgloss for c99/gcc-14
So in this case we mostly need to include an internal header (epiphany-syscalls.h). In a few cases an explicit prototype is added. We've also got a return with no value in a function with a non-void return type. Finally the asm_syscall interface expects a pointer as its first argument. In a few cases we've actually got an int (file descriptor) which we just cast to a void *. It's slightly more than Jeff J's pre-approval, but I think still reasonable.
Diffstat (limited to 'libgloss/epiphany/lseek.c')
-rw-r--r--libgloss/epiphany/lseek.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libgloss/epiphany/lseek.c b/libgloss/epiphany/lseek.c
index 64ffcdd28..65d7e52da 100644
--- a/libgloss/epiphany/lseek.c
+++ b/libgloss/epiphany/lseek.c
@@ -30,6 +30,7 @@
#include <syscall.h>
#include <sys/types.h>
+#include "epiphany-syscalls.h"
/* ------------------------------------------------------------------------- */
/*!Set a position in a file
@@ -43,5 +44,5 @@
off_t __attribute__ ((section ("libgloss_epiphany")))
_lseek (int fildes, off_t offset, int whence)
{
- return asm_syscall (fildes, offset, whence, SYS_lseek);
+ return asm_syscall ((void *)fildes, (void *)offset, (void *)whence, SYS_lseek);
} /* _lseek () */