Richard Cooper has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/47759 )

Change subject: sim-se: Fix for build error in MacOS.
......................................................................

sim-se: Fix for build error in MacOS.

On MacOS the build fails because the types of readfds, writefds, and
errorfds cannot be automatically converted to fd_set*. Added casts
similar to the ones used for the FD_ZERO calls to help the compiler.

Change-Id: I40a2268f7f2ca1bece1ecafda52dfddf2212364d
---
M src/sim/syscall_emul.hh
1 file changed, 9 insertions(+), 3 deletions(-)



diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index 802f547..aa02fd6 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -2377,13 +2377,19 @@
      */
     for (int i = 0; i < nfds_h; i++) {
         if (readfds && FD_ISSET(i, &readfds_h))
-            FD_SET(trans_map[i], readfds);
+            FD_SET(trans_map[i],
+                   reinterpret_cast<fd_set *>(
+                       (typename OS::fd_set *)readfds));

         if (writefds && FD_ISSET(i, &writefds_h))
-            FD_SET(trans_map[i], writefds);
+            FD_SET(trans_map[i],
+                   reinterpret_cast<fd_set *>(
+                       (typename OS::fd_set *)writefds));

         if (errorfds && FD_ISSET(i, &errorfds_h))
-            FD_SET(trans_map[i], errorfds);
+            FD_SET(trans_map[i],
+                   reinterpret_cast<fd_set *>(
+                       (typename OS::fd_set *)errorfds));
     }

     return retval;

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

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I40a2268f7f2ca1bece1ecafda52dfddf2212364d
Gerrit-Change-Number: 47759
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Cooper <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to