diff options
| author | Joseph Henry <[email protected]> | 2017-11-06 16:19:55 -0800 |
|---|---|---|
| committer | Joseph Henry <[email protected]> | 2017-11-06 16:19:55 -0800 |
| commit | 614432907c6b3afce8f238931afe0714937c4e2d (patch) | |
| tree | b91a4705125a441a0e451d8c5681f9f7bdedfebf /test | |
| parent | e0d4b84dd49a1a6eb0492c813855a96f426ffead (diff) | |
Windows build fixes
Diffstat (limited to 'test')
| -rw-r--r-- | test/selftest.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/test/selftest.cpp b/test/selftest.cpp index c3274fa..7705cfd 100644 --- a/test/selftest.cpp +++ b/test/selftest.cpp @@ -24,20 +24,27 @@ * of your own application. */ -#include <unistd.h> +#if defined(__linux__) || defined(__APPLE__) #include <sys/socket.h> #include <arpa/inet.h> -#include <arpa/inet.h> -#include <string.h> #include <netinet/in.h> #include <netinet/tcp.h> #include <netdb.h> +#include <poll.h> +#endif + +#if defined(__MINGW32__) || defined(__MINGW64__) +#include <WinSock2.h> +#include <stdint.h> +#endif + +#include <unistd.h> +#include <string.h> #include <stdio.h> #include <stdlib.h> #include <string> #include <fcntl.h> #include <errno.h> -#include <poll.h> #include <iostream> #include <vector> #include <algorithm> |
