소스 검색

#define SOCKET int (#450)

Yang Bin 2 년 전
부모
커밋
4aae4bbfe8
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      base/hsocket.h

+ 3 - 1
base/hsocket.h

@@ -66,7 +66,9 @@ HV_INLINE int nonblocking(int sockfd) {
 #define blocking(s)     fcntl(s, F_SETFL, fcntl(s, F_GETFL) & ~O_NONBLOCK)
 #define nonblocking(s)  fcntl(s, F_SETFL, fcntl(s, F_GETFL) |  O_NONBLOCK)
 
-typedef int         SOCKET;
+#ifndef SOCKET
+#define SOCKET int
+#endif
 #define INVALID_SOCKET  -1
 
 HV_INLINE int closesocket(int sockfd) {