From: Luis Silva Date: Tue, 21 May 2024 09:56:48 +0000 (+0100) Subject: arc: libgloss: Use fstat call instead of stat for nSIM X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=25d110dcbdb3a1a02b11f8c53504a27efcda9e82;p=newlib-cygwin.git arc: libgloss: Use fstat call instead of stat for nSIM This change is needed to meet semi-hosting requirements for nSIM GNU I/O interface. Signed-off-by: Luis Silva --- diff --git a/libgloss/arc/nsim-syscalls.c b/libgloss/arc/nsim-syscalls.c index d299f8cdc..80747e95d 100644 --- a/libgloss/arc/nsim-syscalls.c +++ b/libgloss/arc/nsim-syscalls.c @@ -206,7 +206,7 @@ _fstat (int fd, struct stat *buf) { struct nsim_stat nsim_stat; long __res; - _naked_syscall2 (__res, stat, fd, &nsim_stat) + _naked_syscall2 (__res, fstat, fd, &nsim_stat) translate_stat (&nsim_stat, buf); return __res; }