aboutsummaryrefslogtreecommitdiff
path: root/libgloss/epiphany/fstat.c
diff options
context:
space:
mode:
authorJeff Law <jeffreyalaw@gmail.com>2023-12-22 21:29:56 -0700
committerJeff Law <jeffreyalaw@gmail.com>2023-12-22 21:29:56 -0700
commit1df8f9f09b0999e04bc0bbd7170ac7dbfa278213 (patch)
tree1f557a935ceb5675ae2625f527170cbb2d88266e /libgloss/epiphany/fstat.c
parent5e79655f380488eb99dd9cc39c30d7c2927fd998 (diff)
downloadnewlib-1df8f9f09b0999e04bc0bbd7170ac7dbfa278213.zip
newlib-1df8f9f09b0999e04bc0bbd7170ac7dbfa278213.tar.gz
newlib-1df8f9f09b0999e04bc0bbd7170ac7dbfa278213.tar.bz2
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/fstat.c')
-rw-r--r--libgloss/epiphany/fstat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libgloss/epiphany/fstat.c b/libgloss/epiphany/fstat.c
index 5a20b57..d126c2d 100644
--- a/libgloss/epiphany/fstat.c
+++ b/libgloss/epiphany/fstat.c
@@ -31,6 +31,7 @@
#include <sys/stat.h>
#include <syscall.h>
+#include "epiphany-syscalls.h"
/* ------------------------------------------------------------------------- */
@@ -44,6 +45,6 @@
int __attribute__ ((section ("libgloss_epiphany")))
_fstat (int fildes, struct stat *st)
{
- return asm_syscall (fildes, st, NULL, SYS_fstat);
+ return asm_syscall ((void *)fildes, st, NULL, SYS_fstat);
} /* _fstat () */