summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/pselect.c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-11-26 19:26:23 +0100
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-11-27 16:35:31 +0100
commit11cf4e80748af05dd6c8f1d30609a5485bf28372 (patch)
tree46520c787506bd925a0f142dc92bd141ec736939 /libc/sysdeps/linux/common/pselect.c
parent8ccf7c3e8c725e9fc29ad0f5accebb127c9ea246 (diff)
fixup gcc warnings
Remove following warning from common code: warning: ISO C90 forbids mixed declarations and code
Diffstat (limited to 'libc/sysdeps/linux/common/pselect.c')
-rw-r--r--libc/sysdeps/linux/common/pselect.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libc/sysdeps/linux/common/pselect.c b/libc/sysdeps/linux/common/pselect.c
index fbe85b780..bf2c08375 100644
--- a/libc/sysdeps/linux/common/pselect.c
+++ b/libc/sysdeps/linux/common/pselect.c
@@ -36,10 +36,6 @@ static int __NC(pselect)(int nfds, fd_set *readfds, fd_set *writefds,
*/
struct timespec _ts;
- if (timeout != NULL) {
- _ts = *timeout;
- timeout = &_ts;
- }
/* Note: the system call expects 7 values but on most architectures
we can only pass in 6 directly. If there is an architecture with
support for more parameters a new version of this file needs to
@@ -49,6 +45,11 @@ static int __NC(pselect)(int nfds, fd_set *readfds, fd_set *writefds,
__kernel_size_t ss_len;
} data;
+ if (timeout != NULL) {
+ _ts = *timeout;
+ timeout = &_ts;
+ }
+
if (sigmask != NULL) {
data.ss = (__kernel_ulong_t) sigmask;
data.ss_len = __SYSCALL_SIGSET_T_SIZE;