about summary refs log tree commit diff
path: root/sysdeps/unix/bsd
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/bsd')
-rw-r--r--sysdeps/unix/bsd/poll.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/unix/bsd/poll.c b/sysdeps/unix/bsd/poll.c
index 4797ee04a1..4cccfe3b35 100644
--- a/sysdeps/unix/bsd/poll.c
+++ b/sysdeps/unix/bsd/poll.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1996 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 
 The GNU C Library is free software; you can redistribute it and/or
@@ -58,7 +58,7 @@ poll (fds, nfds, timeout)
       }
 
   tv.tv_sec = timeout / 1000;
-  tv.tv_usec = (timeout + 999) / 1000;
+  tv.tv_usec = (timeout % 1000) * 1000;
 
   ready = __select (maxfd + 1, &rset, &wset, &xset,
 		    timeout == -1 ? NULL : &tv);