[core] consolidate duplicated read-to-close code
[lighttpd.git] / src / sys-socket.h
blobc6cdff2e426f24c4ef9aa1f5d606af4b67743d50
1 #ifndef WIN32_SOCKET_H
2 #define WIN32_SOCKET_H
3 #include "first.h"
5 #ifdef __WIN32
7 #include <winsock2.h>
9 #define ECONNRESET WSAECONNRESET
10 #define EINPROGRESS WSAEINPROGRESS
11 #define EALREADY WSAEALREADY
12 #define ECONNABORTED WSAECONNABORTED
13 #define ioctl ioctlsocket
14 #else
15 #include <sys/socket.h>
16 #include <sys/ioctl.h>
17 #include <netinet/in.h>
18 #include <netinet/tcp.h>
19 #include <sys/un.h>
20 #include <arpa/inet.h>
22 #include <netdb.h>
24 #ifdef HAVE_SYS_FILIO_H
25 #include <sys/filio.h> /* FIONREAD (for illumos (OpenIndiana)) */
26 #endif
28 #endif
30 #endif