[gem5-dev] Change in gem5/gem5[master]: sim-se: correct statfs inclusion on !linux host

2019-05-04 Thread Andrea Mondelli (Gerrit)
Andrea Mondelli has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/18668



Change subject: sim-se: correct statfs inclusion on !linux host
..

sim-se: correct statfs inclusion on !linux host

Added missing header
Fixed typo on __linux__ macro conditional

Change-Id: I83b69856e5ec8b23b707642c0e14216cf62db31e
---
M src/sim/syscall_emul.cc
M src/sim/syscall_emul.hh
2 files changed, 4 insertions(+), 1 deletion(-)



diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc
index 98fbe96..1e11950 100644
--- a/src/sim/syscall_emul.cc
+++ b/src/sim/syscall_emul.cc
@@ -1039,7 +1039,7 @@
 SyscallReturn
 fallocateFunc(SyscallDesc *desc, int callnum, Process *p, ThreadContext  
*tc)

 {
-#if __linux__
+#ifdef __linux__
 int index = 0;
 int tgt_fd = p->getSyscallArg(tc, index);
 int mode = p->getSyscallArg(tc, index);
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index 91db9ae..97cc144 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -63,6 +63,9 @@
 #include 
 #include 

+#else
+#include 
+
 #endif

 #ifdef __CYGWIN32__

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/18668
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I83b69856e5ec8b23b707642c0e14216cf62db31e
Gerrit-Change-Number: 18668
Gerrit-PatchSet: 1
Gerrit-Owner: Andrea Mondelli 
Gerrit-MessageType: newchange
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[master]: sim-se: correct statfs inclusion on !linux host

2019-05-04 Thread Andrea Mondelli (Gerrit)
Andrea Mondelli has uploaded a new patch set (#2). (  
https://gem5-review.googlesource.com/c/public/gem5/+/18668 )


Change subject: sim-se: correct statfs inclusion on !linux host
..

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
---
M src/sim/syscall_emul.cc
M src/sim/syscall_emul.hh
2 files changed, 9 insertions(+), 6 deletions(-)


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/18668
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I83b69856e5ec8b23b707642c0e14216cf62db31e
Gerrit-Change-Number: 18668
Gerrit-PatchSet: 2
Gerrit-Owner: Andrea Mondelli 
Gerrit-MessageType: newpatchset
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[master]: sim-se: correct statfs inclusion on !linux host

2019-05-06 Thread Brandon Potter (Gerrit)
Brandon Potter has submitted this change and it was merged. (  
https://gem5-review.googlesource.com/c/public/gem5/+/18668 )


Change subject: sim-se: correct statfs inclusion on !linux host
..

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 
Reviewed-by: Brandon Potter 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M src/sim/syscall_emul.cc
M src/sim/syscall_emul.hh
2 files changed, 9 insertions(+), 6 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, but someone else must approve; Looks  
good to me, approved

  Brandon Potter: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc
index 98fbe96..ba84250 100644
--- a/src/sim/syscall_emul.cc
+++ b/src/sim/syscall_emul.cc
@@ -1039,7 +1039,7 @@
 SyscallReturn
 fallocateFunc(SyscallDesc *desc, int callnum, Process *p, ThreadContext  
*tc)

 {
-#if __linux__
+#if defined(__linux__)
 int index = 0;
 int tgt_fd = p->getSyscallArg(tc, index);
 int mode = p->getSyscallArg(tc, index);
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index 91db9ae..caa4d2c 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 
 #include 

+#else
+#include 
+
 #endif

 #ifdef __CYGWIN32__
@@ -778,12 +781,12 @@
 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 @@
 statfsFunc(SyscallDesc *desc, int callnum, Process *process,
ThreadContext *tc)
 {
-#ifdef __linux__
+#if defined(__linux__)
 std::string path;

 int index = 0;
@@ -2851,7 +2854,7 @@
 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);

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/18668
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I83b69856e5ec8b23b707642c0e14216cf62db31e
Gerrit-Change-Number: 18668
Gerrit-PatchSet: 3
Gerrit-Owner: Andrea Mondelli 
Gerrit-Reviewer: Brandon Potter 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev