浏览代码

avoid closesocket redefine

ithewei 1 年之前
父节点
当前提交
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