Package: wmifinfo
Version: 0.09-4
Severity: normal
Tags: patch
Hi,
A bug report on lkml shed light on a programming error in wmifinfo, see
<http://mid.gmane.org/[EMAIL PROTECTED]>
The tv_usec member of struct timeval must be in [0; 1000000[, and wmifinfo
currently sets it to 1000000. (was 5000000 in the case reported above)
Patch attached, please apply.
Also, please drop x-dev from the Build-Depends; it's unneeded and actually
doesn't pull in anything useful for the build of wmifinfo, it's just cluttering
the Build-Depends and forces more packages to be fetched and installed than is
necessary.
Thanks,
JB.
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.27 (SMP w/2 CPU cores)
Locale: LANG=C, [EMAIL PROTECTED] (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash
--- wmifinfo-0.09.orig/wmifinfo.c
+++ wmifinfo-0.09/wmifinfo.c
@@ -49,6 +49,7 @@
#define MAXIFS 10
#ifdef linux
#define DELAY 1000000L
+#define USEC_PER_SEC 1000000L
#else
#define DELAY 100000L
#endif
@@ -267,8 +268,8 @@
}
#ifdef linux
- tv.tv_sec = 0;
- tv.tv_usec = DELAY;
+ tv.tv_sec = DELAY / USEC_PER_SEC;
+ tv.tv_usec = DELAY - (tv.tv_sec * USEC_PER_SEC);
FD_ZERO(&fds);
FD_SET(ConnectionNumber(display), &fds);