]> granicus.if.org Git - pgbouncer/commitdiff
win32: make asynctest compile again
authorMarko Kreen <markokr@gmail.com>
Mon, 29 Dec 2008 15:57:55 +0000 (15:57 +0000)
committerMarko Kreen <markokr@gmail.com>
Mon, 29 Dec 2008 15:57:55 +0000 (15:57 +0000)
By Hiroshi Saito

test/Makefile
test/asynctest.c

index eb39d4193bd3db49cbe9f60ab48a16c5ce8354cb..c9bfbc7c42350b7147fd79a359ba1350731f0681 100644 (file)
@@ -8,6 +8,10 @@ CPPFLAGS += -I../include $(PGINC)
 LDFLAGS += $(PGLIB)
 LIBS := -lpq $(LIBS)
 
+ifeq ($(PORTNAME),win32)
+CPPFLAGS += -I../win32
+endif
+
 all: asynctest
 
 asynctest: asynctest.c
index 794218dbc51574622e8c93730404021f2fe63a71..d6777cbfb1df1565f2b1faf5dcbe28481b461d14 100644 (file)
@@ -8,6 +8,11 @@
 
 #include "system.h"
 
+#ifdef WIN32
+#undef strerror
+#undef main
+#endif
+
 #include <getopt.h>
 #include <event.h>
 #include <libpq-fe.h>
@@ -513,6 +518,7 @@ int main(int argc, char *argv[])
        char *cstr = NULL;
        int numcon = 50;
 #ifdef WIN32
+       int wsresult;
        WSADATA wsaData;
 #endif