#else
#include <sys/types.h>
#include <sys/socket.h>
+#ifdef ANDROID
+#include <fcntl.h>
+#else
#include <sys/fcntl.h>
+#endif
#include <arpa/inet.h>
#include <netdb.h>
#include <net/if.h>
#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