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 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47759 Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu> Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -2377,13 +2377,19 @@ selectFunc(SyscallDesc *desc, ThreadContext *tc, int nfds,
|
||||
*/
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user