]> granicus.if.org Git - libevent/commitdiff
Fix win32 build issues: sleep, pid_t
authorNick Mathewson <nickm@torproject.org>
Thu, 3 May 2012 16:05:52 +0000 (12:05 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 3 May 2012 16:05:52 +0000 (12:05 -0400)
test/regress.c
test/regress.h

index b2f70c411a8b19774bf09927515bcc208815a044..25d9a884df9f33ddce6ab17f743565681c7d4534 100644 (file)
@@ -878,7 +878,11 @@ test_fork(void)
        }
 
        /* wait for the child to read the data */
+#ifdef _WIN32
+       Sleep(1000);
+#else
        sleep(1);
+#endif
 
        if (write(pair[0], TEST1, strlen(TEST1)+1) < 0) {
                tt_fail_perror("write");
index afcc35fc540235443b727deea35d444e81a30d45..78dc3d01b5e6b737d749aa1d0dc71df69707a38d 100644 (file)
@@ -118,7 +118,9 @@ int _test_ai_eq(const struct evutil_addrinfo *ai, const char *sockaddr_port,
 
 long timeval_msec_diff(const struct timeval *start, const struct timeval *end);
 
+#ifndef _WIN32
 pid_t regress_fork(void);
+#endif
 
 #ifdef __cplusplus
 }