aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-03-05 19:35:48 -0800
committerGarrett D'Amore <garrett@damore.org>2018-03-05 19:39:19 -0800
commit3649003b4aa65f3d28c04a08e90b84f61313ca67 (patch)
tree87bc723f71a5a6c4d7a2d86a17988a2de77bd045 /tests
parentc4da7817b4c8dd71b2a07d4d1c46b486ec57eeb4 (diff)
downloadnng-3649003b4aa65f3d28c04a08e90b84f61313ca67.tar.gz
nng-3649003b4aa65f3d28c04a08e90b84f61313ca67.tar.bz2
nng-3649003b4aa65f3d28c04a08e90b84f61313ca67.zip
Fix for Windows compilation warnings.
Diffstat (limited to 'tests')
-rw-r--r--tests/pollfd.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/pollfd.c b/tests/pollfd.c
index 7a87fe9b..06c3a15c 100644
--- a/tests/pollfd.c
+++ b/tests/pollfd.c
@@ -14,6 +14,7 @@
#include <poll.h>
#include <unistd.h>
#define INVALID_SOCKET -1
+#define SOCKET int
#else
#define poll WSAPoll
@@ -54,7 +55,7 @@ TestMain("Poll FDs", {
nng_msleep(50);
Convey("We can get a recv FD", {
- int fd;
+ SOCKET fd;
size_t sz;
sz = sizeof(fd);
@@ -92,7 +93,7 @@ TestMain("Poll FDs", {
});
Convey("We can get a send FD", {
- int fd;
+ SOCKET fd;
size_t sz;
sz = sizeof(fd);
@@ -102,7 +103,7 @@ TestMain("Poll FDs", {
});
Convey("Must have a big enough size", {
- int fd;
+ SOCKET fd;
size_t sz;
sz = 1;
So(nng_getopt(s1, NNG_OPT_RECVFD, &fd, &sz) ==
@@ -115,7 +116,7 @@ TestMain("Poll FDs", {
Convey("We cannot get a send FD for PULL", {
nng_socket s3;
- int fd;
+ SOCKET fd;
size_t sz;
So(nng_pull0_open(&s3) == 0);
Reset({ nng_close(s3); });
@@ -125,7 +126,7 @@ TestMain("Poll FDs", {
Convey("We cannot get a recv FD for PUSH", {
nng_socket s3;
- int fd;
+ SOCKET fd;
size_t sz;
So(nng_push0_open(&s3) == 0);
Reset({ nng_close(s3); });