summaryrefslogtreecommitdiff
path: root/src/sim/syscall_emul.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim/syscall_emul.hh')
-rw-r--r--src/sim/syscall_emul.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index e2d13067c..abab356df 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -618,8 +618,13 @@ stat64Func(SyscallDesc *desc, int callnum, LiveProcess *process,
// Adjust path for current working directory
path = process->fullPath(path);
+#if NO_STAT64
+ struct stat hostBuf;
+ int result = stat(path.c_str(), &hostBuf);
+#else
struct stat64 hostBuf;
int result = stat64(path.c_str(), &hostBuf);
+#endif
if (result < 0)
return -errno;