mirror of
https://github.com/pavel-odintsov/fastnetmon
synced 2024-05-21 11:16:26 +02:00
Made Patricial library cross platform
This commit is contained in:
parent
e09d02e2d9
commit
dd755df567
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <winsock.h>
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue