25 lines
413 B
C
25 lines
413 B
C
|
#ifndef WIN32_SOCKET_H
|
||
|
#define WIN32_SOCKET_H
|
||
|
|
||
|
#ifdef __WIN32
|
||
|
|
||
|
#include <winsock2.h>
|
||
|
|
||
|
#define ECONNRESET WSAECONNRESET
|
||
|
#define EINPROGRESS WSAEINPROGRESS
|
||
|
#define EALREADY WSAEALREADY
|
||
|
#define ioctl ioctlsocket
|
||
|
#define hstrerror(x) ""
|
||
|
#else
|
||
|
#include <sys/socket.h>
|
||
|
#include <sys/ioctl.h>
|
||
|
#include <netinet/in.h>
|
||
|
#include <netinet/tcp.h>
|
||
|
#include <sys/un.h>
|
||
|
#include <arpa/inet.h>
|
||
|
|
||
|
#include <netdb.h>
|
||
|
#endif
|
||
|
|
||
|
#endif
|