diff options
author | dchagin <dchagin@FreeBSD.org> | 2016-01-09 16:47:36 +0000 |
---|---|---|
committer | dchagin <dchagin@FreeBSD.org> | 2016-01-09 16:47:36 +0000 |
commit | 623ca9818819fc3b87701ba39c1fcc6bd40ca9e5 (patch) | |
tree | ee01c664a1e76c7ea8246fc1c1bdf09010b5a07e /sys/compat | |
parent | 2ce85f55b6e94fb6842d99d07fd316dfd1361a1a (diff) | |
download | FreeBSD-src-623ca9818819fc3b87701ba39c1fcc6bd40ca9e5.zip FreeBSD-src-623ca9818819fc3b87701ba39c1fcc6bd40ca9e5.tar.gz |
MFC r283443:
Put the correct value for the abi_nfdbits parameter of kern_select() for
all supported Linuxulators.
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/linux/linux_misc.c | 4 | ||||
-rw-r--r-- | sys/compat/linux/linux_misc.h | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index bf8c462..abf59c7 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -532,7 +532,7 @@ linux_select(struct thread *td, struct linux_select_args *args) tvp = NULL; error = kern_select(td, args->nfds, args->readfds, args->writefds, - args->exceptfds, tvp, sizeof(l_int) * 8); + args->exceptfds, tvp, LINUX_NFDBITS); #ifdef DEBUG if (ldebug(select)) @@ -2179,7 +2179,7 @@ linux_pselect6(struct thread *td, struct linux_pselect6_args *args) tvp = NULL; error = kern_pselect(td, args->nfds, args->readfds, args->writefds, - args->exceptfds, tvp, ssp, sizeof(l_int) * 8); + args->exceptfds, tvp, ssp, LINUX_NFDBITS); if (error == 0 && args->tsp != NULL) { if (td->td_retval[0] != 0) { diff --git a/sys/compat/linux/linux_misc.h b/sys/compat/linux/linux_misc.h index 62c76da..7202e4a 100644 --- a/sys/compat/linux/linux_misc.h +++ b/sys/compat/linux/linux_misc.h @@ -33,6 +33,9 @@ #include <sys/sysctl.h> + /* bits per mask */ +#define LINUX_NFDBITS sizeof(l_fd_mask) * 8 + /* * Miscellaneous */ |