[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PATCH: Fix poll() impl on Win32
From: |
Daniel P. Berrange |
Subject: |
PATCH: Fix poll() impl on Win32 |
Date: |
Wed, 7 Jan 2009 19:04:25 +0000 |
User-agent: |
Mutt/1.4.1i |
I've been using the GNULIB poll() impl in libvirt on Win32 (well Mingw +
WINE) and found it was producing really wierd results, such ret=-1 +
errno=EAGAIN, or ret=0 even though requested timeout was infinite.
After a little debugging I discovered a missing initialization of
the 'rc' variable in the Win32 impl of poll(). With this patch
applied, it is behaving as desired.
diff --git a/gnulib/lib/poll.c b/gnulib/lib/poll.c
--- a/gnulib/lib/poll.c
+++ b/gnulib/lib/poll.c
@@ -405,7 +405,7 @@ poll (pfd, nfd, timeout)
BOOL poll_again;
MSG msg;
char sockbuf[256];
- int rc;
+ int rc = 0;
nfds_t i;
if (nfd < 0 || timeout < -1)
Regards,
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
- PATCH: Fix poll() impl on Win32,
Daniel P. Berrange <=