From 69d8bd9213c688e0d249e54aee90aaf1436cdc49 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 8 Mar 2018 11:43:00 -0800 Subject: [PATCH] fixes #272 pollfd test fails on AppVeyor --- tests/pollfd.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/pollfd.c b/tests/pollfd.c index 06c3a15cb..aa07adab0 100644 --- a/tests/pollfd.c +++ b/tests/pollfd.c @@ -14,7 +14,6 @@ #include #include #define INVALID_SOCKET -1 -#define SOCKET int #else #define poll WSAPoll @@ -55,12 +54,12 @@ TestMain("Poll FDs", { nng_msleep(50); Convey("We can get a recv FD", { - SOCKET fd; + int fd; size_t sz; sz = sizeof(fd); So(nng_getopt(s1, NNG_OPT_RECVFD, &fd, &sz) == 0); - So(fd != INVALID_SOCKET); + So(fd != (int) INVALID_SOCKET); Convey("And it is always the same fd", { int fd2; @@ -93,17 +92,17 @@ TestMain("Poll FDs", { }); Convey("We can get a send FD", { - SOCKET fd; + int fd; size_t sz; sz = sizeof(fd); So(nng_getopt(s1, NNG_OPT_SENDFD, &fd, &sz) == 0); - So(fd != INVALID_SOCKET); + So(fd != (int) INVALID_SOCKET); So(nng_send(s1, "oops", 4, 0) == 0); }); Convey("Must have a big enough size", { - SOCKET fd; + int fd; size_t sz; sz = 1; So(nng_getopt(s1, NNG_OPT_RECVFD, &fd, &sz) == @@ -116,7 +115,7 @@ TestMain("Poll FDs", { Convey("We cannot get a send FD for PULL", { nng_socket s3; - SOCKET fd; + int fd; size_t sz; So(nng_pull0_open(&s3) == 0); Reset({ nng_close(s3); }); @@ -126,7 +125,7 @@ TestMain("Poll FDs", { Convey("We cannot get a recv FD for PUSH", { nng_socket s3; - SOCKET fd; + int fd; size_t sz; So(nng_push0_open(&s3) == 0); Reset({ nng_close(s3); });