From 25d110dcbdb3a1a02b11f8c53504a27efcda9e82 Mon Sep 17 00:00:00 2001 From: Luis Silva Date: Tue, 21 May 2024 10:56:48 +0100 Subject: [PATCH] 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 --- 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; } -- 2.43.5