X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fcompat.h;h=a4c648909ac3ac5033d960352ad62eae64cd91e2;hb=0a18ce8f4cd1a723f50333945d94c84b45c8d56b;hp=3caa90a21e996a3d4076c346e86156dd5bd8a1b5;hpb=ec7a9034023d01c6bcbfc84cd446f93a55b96ab2;p=novacoin.git diff --git a/src/compat.h b/src/compat.h index 3caa90a..a4c6489 100644 --- a/src/compat.h +++ b/src/compat.h @@ -12,6 +12,9 @@ #define NOMINMAX #endif #ifndef _MSC_VER +#ifdef FD_SETSIZE +#undef FD_SETSIZE +#endif #define FD_SETSIZE 1024 // max number of fds in fd_set #endif #include @@ -20,7 +23,11 @@ #else #include #include +#ifdef ANDROID +#include +#else #include +#endif #include #include #include @@ -49,19 +56,4 @@ typedef int socklen_t; #define SOCKET_ERROR -1 #endif -inline int myclosesocket(SOCKET& hSocket) -{ - if (hSocket == INVALID_SOCKET) - return WSAENOTSOCK; -#ifdef WIN32 - int ret = closesocket(hSocket); -#else - int ret = close(hSocket); -#endif - hSocket = INVALID_SOCKET; - return ret; -} -#define closesocket(s) myclosesocket(s) - - -#endif +#endif \ No newline at end of file