summaryrefslogtreecommitdiff
path: root/src/sim/syscall_emul.hh
diff options
context:
space:
mode:
authorAndrea Mondelli <Andrea.Mondelli@ucf.edu>2019-05-04 09:43:24 -0400
committerBrandon Potter <Brandon.Potter@amd.com>2019-05-06 18:20:44 +0000
commit7a00e9d186f4b1ad463b9e0adf46cbfbe9f0d87b (patch)
tree1a1cc0c5427e0aa36813c7187c2c3f60feca8f21 /src/sim/syscall_emul.hh
parent53e74695ac28e02d10594af0ef6afff6536a0d35 (diff)
downloadgem5-7a00e9d186f4b1ad463b9e0adf46cbfbe9f0d87b.tar.xz
sim-se: correct statfs inclusion on !linux host
- Added missing header - Fixed typo on __linux__ macro conditional - s/ifdef/if defined/g for consistency Change-Id: I83b69856e5ec8b23b707642c0e14216cf62db31e Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18668 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/sim/syscall_emul.hh')
-rw-r--r--src/sim/syscall_emul.hh13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index 91db9ae49..caa4d2cf3 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -59,10 +59,13 @@
/// This file defines objects used to emulate syscalls from the target
/// application on the host machine.
-#ifdef __linux__
+#if defined(__linux__)
#include <sys/eventfd.h>
#include <sys/statfs.h>
+#else
+#include <sys/mount.h>
+
#endif
#ifdef __CYGWIN32__
@@ -778,12 +781,12 @@ ioctlFunc(SyscallDesc *desc, int callnum, Process *p, ThreadContext *tc)
return status;
}
case SIOCGIFFLAGS:
-#ifdef __linux__
+#if defined(__linux__)
case SIOCGIFINDEX:
#endif
case SIOCGIFNETMASK:
case SIOCGIFADDR:
-#ifdef __linux__
+#if defined(__linux__)
case SIOCGIFHWADDR:
#endif
case SIOCGIFMTU: {
@@ -1515,7 +1518,7 @@ SyscallReturn
statfsFunc(SyscallDesc *desc, int callnum, Process *process,
ThreadContext *tc)
{
-#ifdef __linux__
+#if defined(__linux__)
std::string path;
int index = 0;
@@ -2851,7 +2854,7 @@ template <class OS>
SyscallReturn
eventfdFunc(SyscallDesc *desc, int num, Process *p, ThreadContext *tc)
{
-#ifdef __linux__
+#if defined(__linux__)
int index = 0;
unsigned initval = p->getSyscallArg(tc, index);
int in_flags = p->getSyscallArg(tc, index);