1
0
Эх сурвалжийг харах

avoid closesocket redefine

ithewei 1 жил өмнө
parent
commit
4697294eb7
1 өөрчлөгдсөн 2 нэмэгдсэн , 0 устгасан
  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