1
0
Fork 0
mirror of https://github.com/pavel-odintsov/fastnetmon synced 2024-05-03 22:26:30 +02:00

Made Patricial library cross platform

This commit is contained in:
Pavel Odintsov 2023-04-02 15:57:30 +01:00
parent e09d02e2d9
commit dd755df567
3 changed files with 19 additions and 2 deletions

View File

@ -1,7 +1,7 @@
#pragma once
#ifdef _WIN32
#include <winsock.h>
#include <winsock2.h>
#else
#include <arpa/inet.h>
#endif

View File

@ -19,7 +19,15 @@
static char copyright[] = "This product includes software developed by the University of Michigan, Merit"
"Network, Inc., and their contributors.";
#pragma GCC diagnostic pop
#include <arpa/inet.h> /* BSD, Linux, Solaris: for inet_addr */
#ifdef _WIN32
#include <winsock2.h>
#include <ws2tcpip.h> // for inet_ntop
#else
// for inet_addr
#include <arpa/inet.h> // for inet_addr
#endif
#include <assert.h> /* assert */
#include <ctype.h> /* isdigit */
#include <errno.h> /* errno */

View File

@ -18,9 +18,18 @@
#include <errno.h> /* for EAFNOSUPPORT */
#ifdef _WIN32
#include <winsock2.h>
#include <in6addr.h>
#else
#include <netinet/in.h> /* for struct in_addr */
#include <sys/socket.h> /* for AF_INET */
#endif
#include <functional>
#include <iostream>