瀏覽代碼

inline closesocket

ithewei 3 年之前
父節點
當前提交
8670c4d9cd
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      base/hsocket.h

+ 4 - 1
base/hsocket.h

@@ -65,7 +65,10 @@ HV_INLINE int nonblocking(int sockfd) {
 
 typedef int         SOCKET;
 #define INVALID_SOCKET  -1
-#define closesocket(fd) close(fd)
+
+HV_INLINE int closesocket(int sockfd) {
+    return close(sockfd);
+}
 
 #endif