6#ifndef BITCOIN_COMPAT_COMPAT_H
7#define BITCOIN_COMPAT_COMPAT_H
9#if defined(HAVE_CONFIG_H)
10#include <config/bitcoin-config.h>
23#define FD_SETSIZE 1024
33#include <netinet/in.h>
34#include <netinet/tcp.h>
37#include <sys/select.h>
38#include <sys/socket.h>
48typedef u_short sa_family_t;
57#define WSAGetLastError() errno
58#define WSAEINVAL EINVAL
59#define WSAEWOULDBLOCK EWOULDBLOCK
60#define WSAEAGAIN EAGAIN
61#define WSAEMSGSIZE EMSGSIZE
63#define WSAEINPROGRESS EINPROGRESS
64#define WSAEADDRINUSE EADDRINUSE
65#define INVALID_SOCKET (SOCKET)(~0)
66#define SOCKET_ERROR -1
70#define WSAEAGAIN EAGAIN
72#define WSAEAGAIN WSAEWOULDBLOCK
94typedef SSIZE_T ssize_t;
97#if HAVE_DECL_STRNLEN == 0
98size_t strnlen(
const char *start,
size_t max_len);
115#if defined(__linux__)
121#if !defined(MSG_NOSIGNAL)
122#define MSG_NOSIGNAL 0
127#if !defined(MSG_DONTWAIT)
128#define MSG_DONTWAIT 0
size_t strnlen(const char *start, size_t max_len)