]> granicus.if.org Git - libevent/commitdiff
Fix win32 compilation.
authorNick Mathewson <nickm@torproject.org>
Wed, 21 Oct 2009 04:45:59 +0000 (04:45 +0000)
committerNick Mathewson <nickm@torproject.org>
Wed, 21 Oct 2009 04:45:59 +0000 (04:45 +0000)
svn:r1451

WIN32-Code/win32.c

index cb47ced4bde8351d4a934f20ec7aa0f84bf1f373..3b0e808c704417a6848465d64ceb431bc0933580 100644 (file)
@@ -44,6 +44,8 @@
 #include "event2/event.h"
 #include "event-internal.h"
 #include "evmap-internal.h"
+#include "event2/thread.h"
+#include "evthread-internal.h"
 
 #define XFREE(ptr) do { if (ptr) mm_free(ptr); } while(0)
 
@@ -282,14 +284,15 @@ win32_dispatch(struct event_base *base, struct timeval *tv)
        int fd_count;
        SOCKET s;
 
-       if (op->resize_out_sets) {
-               if (!(op->readset_out = mm_realloc(op->readset_out, size)))
+       if (win32op->resize_out_sets) {
+               size_t size = win32op->fd_setsz;
+               if (!(win32op->readset_out = mm_realloc(win32op->readset_out, size)))
                        return (-1);
-               if (!(op->exset_out = mm_realloc(op->exset_out, size)))
+               if (!(win32op->exset_out = mm_realloc(win32op->exset_out, size)))
                        return (-1);
-               if (!(op->writeset_out = mm_realloc(op->writeset_out, size)))
+               if (!(win32op->writeset_out = mm_realloc(win32op->writeset_out, size)))
                        return (-1);
-               op->resize_out_sets = 0;
+               win32op->resize_out_sets = 0;
        }
 
        fd_set_copy(win32op->readset_out, win32op->readset_in);