Skip to content

Commit

Permalink
Fix types in the QEMU select implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunfishcode committed Sep 24, 2024
1 parent 397ab70 commit f635e79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ci/select-setsize.patch
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ diff -ur a/linux-user/syscall.c b/linux-user/syscall.c
if ((b >> j) & 1)
- FD_SET(k, fds);
+ fds[k / (sizeof(unsigned long) * 8)] |=
+ 1 << (k % (sizeof(unsigned long) * 8));
+ 1ul << (k % (sizeof(unsigned long) * 8));
k++;
}
}
Expand Down Expand Up @@ -76,7 +76,7 @@ diff -ur a/linux-user/syscall.c b/linux-user/syscall.c
- v |= ((abi_ulong)(FD_ISSET(k, fds) != 0) << j);
+ bool set =
+ (fds[k / (sizeof(unsigned long) * 8)] &
+ (1 << (k % (sizeof(unsigned long) * 8)))) != 0;
+ (1ul << (k % (sizeof(unsigned long) * 8)))) != 0;
+ v |= ((abi_ulong)set << j);
k++;
}
Expand Down

0 comments on commit f635e79

Please sign in to comment.