Skip to content

Commit fd7c9df

Browse files
committed
compat/net.h: Add CLOSESOCKET macro
1 parent b8a2b5a commit fd7c9df

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/compat/net.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,15 @@
4545
#ifdef _WIN32
4646
#include <winsock2.h>
4747
typedef SOCKET fd_t;
48+
#define CLOSESOCKET closesocket
4849
#else
4950
#include <arpa/inet.h> // for htonl, ntohl
5051
#include <netdb.h> // for getaddrinfo
5152
#include <netinet/in.h> // for sockaddr_in[6]
5253
#include <sys/socket.h> // for sockaddr, sockaddr_storage
5354
typedef int fd_t;
5455
#define INVALID_SOCKET (-1)
56+
#define CLOSESOCKET close
5557
#endif
5658
// IWYU pragma: end_exports
5759

0 commit comments

Comments
 (0)