Jelajahi Sumber

avoid closesocket redefine

ithewei 1 tahun lalu
induk
melakukan
4697294eb7
1 mengubah file dengan 2 tambahan dan 0 penghapusan
  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