BIP155 (addrv2)
Tor v3 + i2p
This commit is contained in:
12
src/compat.h
12
src/compat.h
@@ -78,6 +78,8 @@ typedef u_int SOCKET;
|
||||
#define SOCKET_ERROR -1
|
||||
#endif
|
||||
|
||||
#define WSAEAGAIN EAGAIN
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifndef S_IRUSR
|
||||
#define S_IRUSR 0400
|
||||
@@ -109,8 +111,14 @@ typedef u_int SOCKET;
|
||||
size_t strnlen( const char *start, size_t max_len);
|
||||
#endif // HAVE_DECL_STRNLEN
|
||||
|
||||
bool static inline IsSelectableSocket(SOCKET s) {
|
||||
#ifdef _WIN32
|
||||
#ifndef WIN32
|
||||
typedef void* sockopt_arg_type;
|
||||
#else
|
||||
typedef char* sockopt_arg_type;
|
||||
#endif
|
||||
|
||||
bool static inline IsSelectableSocket(const SOCKET& s) {
|
||||
#ifdef WIN32
|
||||
return true;
|
||||
#else
|
||||
return (s < FD_SETSIZE);
|
||||
|
||||
Reference in New Issue
Block a user