summaryrefslogtreecommitdiff
path: root/hurd/hurdselect.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2013-02-27 02:28:46 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-02-27 02:28:46 +0100
commit67d3467d671870d428af01a6c5945940da31c02a (patch)
tree2c4e9d365a608a958b07fad54380e211e7915a37 /hurd/hurdselect.c
parent034666479ea24fccc3fecfaed037fc15614af9c3 (diff)
parent49683f5a992e6fd4bf5863aa581bc9f7796711f8 (diff)
Merge commit 'refs/top-bases/t/poll_errors_fixes' into t/poll_errors_fixes
Diffstat (limited to 'hurd/hurdselect.c')
-rw-r--r--hurd/hurdselect.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/hurd/hurdselect.c b/hurd/hurdselect.c
index 3317a08eac..2ea7cfda5e 100644
--- a/hurd/hurdselect.c
+++ b/hurd/hurdselect.c
@@ -54,7 +54,7 @@ _hurd_select (int nfds,
int firstfd, lastfd;
mach_msg_id_t reply_msgid;
mach_msg_timeout_t to;
- time_data_t td;
+ struct timespec ts;
struct
{
struct hurd_userlink ulink;
@@ -100,17 +100,17 @@ _hurd_select (int nfds,
if (err)
return -1;
- td[0].sec = now.tv_sec + timeout->tv_sec;
- td[0].nsec = now.tv_usec * 1000 + timeout->tv_nsec;
+ ts.tv_sec = now.tv_sec + timeout->tv_sec;
+ ts.tv_nsec = now.tv_usec * 1000 + timeout->tv_nsec;
- if (td[0].nsec >= 1000000000)
+ if (ts.tv_nsec >= 1000000000)
{
- td[0].sec++;
- td[0].nsec -= 1000000000;
+ ts.tv_sec++;
+ ts.tv_nsec -= 1000000000;
}
- if (td[0].sec < 0)
- td[0].sec = LONG_MAX; /* XXX */
+ if (ts.tv_sec < 0)
+ ts.tv_sec = LONG_MAX; /* XXX */
reply_msgid = IO_SELECT_TIMEOUT_REPLY_MSGID;
}
@@ -281,7 +281,7 @@ _hurd_select (int nfds,
err = __io_select_request (d[i].io_port, d[i].reply_port, type);
else
err = __io_select_timeout_request (d[i].io_port, d[i].reply_port,
- td, type);
+ ts, type);
if (!err)
{
if (firstfd == lastfd)