about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2010-08-02 16:46:12 -0700
committerAndreas Schwab <schwab@redhat.com>2010-12-01 15:35:10 +0100
commit57f69e95c9f89073d0bbc278670c94061d69c7a0 (patch)
treeaee026ef67c546623b1d4d9662490bf08281f15a
parente7ce843098311452463e2f2faa6be485551d3b87 (diff)
downloadglibc-57f69e95c9f89073d0bbc278670c94061d69c7a0.tar.gz
glibc-57f69e95c9f89073d0bbc278670c94061d69c7a0.tar.xz
glibc-57f69e95c9f89073d0bbc278670c94061d69c7a0.zip
Hurd: fix timeout rounding in select
(cherry picked from commit 5a42321d438211210e0869e5e90f8d75d1354e14)
-rw-r--r--ChangeLog5
-rw-r--r--hurd/hurdselect.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 833e55e1a9..50c75b6f09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-07-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>
+
+	* hurd/hurdselect.c (_hurd_select): Round timeout up instead of down
+	when converting to ms.
+
 2010-07-29  Roland McGrath  <roland@redhat.com>
 
 	[BZ 11856]
diff --git a/hurd/hurdselect.c b/hurd/hurdselect.c
index 544eee9cb5..a7228f0611 100644
--- a/hurd/hurdselect.c
+++ b/hurd/hurdselect.c
@@ -52,7 +52,7 @@ _hurd_select (int nfds,
   int firstfd, lastfd;
   mach_msg_timeout_t to = (timeout != NULL ?
 			   (timeout->tv_sec * 1000 +
-			    timeout->tv_nsec / 1000000) :
+			    (timeout->tv_nsec + 999999) / 1000000) :
 			   0);
   struct
     {