[05/15] arc: libgloss: Use fstat call instead of stat for nSIM

Message ID 20240521095658.10311-6-kolerov93@gmail.com
State New
Series A series of fixes for ARC and libgloss update |

Commit Message

Yuriy Kolerov May 21, 2024, 9:56 a.m. UTC
  From: Luis Silva <luis.m.silva99@hotmail.com>

This change is needed to meet semi-hosting requirements
for nSIM GNU I/O interface.

Signed-off-by: Luis Silva <luis.m.silva99@hotmail.com>
 libgloss/arc/nsim-syscalls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


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;