Explorar o código

inline closesocket

ithewei %!s(int64=3) %!d(string=hai) anos
pai
achega
8670c4d9cd
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  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