summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compat/mingw.c7
-rw-r--r--compat/mingw.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/compat/mingw.c b/compat/mingw.c
index bee6054419..1cbc9e83d4 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -1219,6 +1219,13 @@ int mingw_setsockopt(int sockfd, int lvl, int optname, void *optval, int optlen)
return setsockopt(s, lvl, optname, (const char*)optval, optlen);
}
+#undef shutdown
+int mingw_shutdown(int sockfd, int how)
+{
+ SOCKET s = (SOCKET)_get_osfhandle(sockfd);
+ return shutdown(s, how);
+}
+
#undef listen
int mingw_listen(int sockfd, int backlog)
{
diff --git a/compat/mingw.h b/compat/mingw.h
index 14211c6214..3b20fa9799 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -219,6 +219,9 @@ int mingw_bind(int sockfd, struct sockaddr *sa, size_t sz);
int mingw_setsockopt(int sockfd, int lvl, int optname, void *optval, int optlen);
#define setsockopt mingw_setsockopt
+int mingw_shutdown(int sockfd, int how);
+#define shutdown mingw_shutdown
+
int mingw_listen(int sockfd, int backlog);
#define listen mingw_listen