소스 검색

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