]> granicus.if.org Git - libevent/commitdiff
Fix kquue correctness test on x84_64
authorNick Mathewson <nickm@torproject.org>
Thu, 19 Aug 2010 13:38:44 +0000 (09:38 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 19 Aug 2010 13:43:04 +0000 (09:43 -0400)
Apparently, in our configure.in check for a working kqueue, we were
leaving some fields unset that seemed to irritate 64-bit kqueue a lot.

Found by Christopher Layne

configure.in

index 73e54dfcbc04a727b0cd24084726c48368e40370..1967d90a44378dfbfdeb674120b76d8dedaf971e 100644 (file)
@@ -330,13 +330,14 @@ main(int argc, char **argv)
         if ((kq = kqueue()) == -1)
                exit(1);
 
+       memset(&ev, 0, sizeof(ev));
        ev.ident = fd[[1]];
        ev.filter = EVFILT_WRITE;
        ev.flags = EV_ADD | EV_ENABLE;
        n = kevent(kq, &ev, 1, NULL, 0, NULL);
        if (n == -1)
                exit(1);
-       
+
        read(fd[[0]], buf, sizeof(buf));
 
        ts.tv_sec = 0;