Explorar o código

avoid closesocket redefine

ithewei hai 1 ano
pai
achega
4697294eb7
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      base/hsocket.h

+ 2 - 0
base/hsocket.h

@@ -82,9 +82,11 @@ HV_INLINE int nonblocking(int s) {
     return fcntl(s, F_SETFL, fcntl(s, F_GETFL) |  O_NONBLOCK);
 }
 
+#ifndef closesocket
 HV_INLINE int closesocket(int sockfd) {
     return close(sockfd);
 }
+#endif
 
 #endif