Fix definitions of SHUT_RD and SHUT_WR
authorRichard Levitte <levitte@openssl.org>
Wed, 5 Oct 2022 08:20:35 +0000 (10:20 +0200)
committerRichard Levitte <levitte@openssl.org>
Tue, 25 Oct 2022 11:25:00 +0000 (13:25 +0200)
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19345)

include/internal/sockets.h
ssl/quic/quic_rx_depack.c

index e6e958b8b8019c0d92903d00cbbfaea7bcfac77d..dcb4c8c3f440c41018dcdbee81c7d614648dc05f 100644 (file)
@@ -61,6 +61,17 @@ struct servent *PASCAL getservbyname(const char *, const char *);
 #   define accept(s,f,l)   ((int)accept(s,f,l))
 #  endif
 
+/* Windows have other names for shutdown() reasons */
+#  ifndef SHUT_RD
+#   define SHUT_RD SD_RECEIVE
+#  endif
+#  ifndef SHUT_WR
+#   define SHUT_WR SD_SEND
+#  endif
+#  ifndef SHUT_RDWR
+#   define SHUT_RDWR SD_BOTH
+#  endif
+
 # else
 #  if defined(__APPLE__)
     /*
index bf7c0364fc380d309b8e3634a99404101ed260ff..404d5b883e441c6ca1e0f814751ef2215b46064d 100644 (file)
@@ -13,6 +13,7 @@
 #include "internal/quic_record_rx.h"
 #include "internal/quic_ackm.h"
 #include "internal/quic_rx_depack.h"
+#include "internal/sockets.h"
 
 #include "quic_record_rx_wrap.h"
 #include "quic_local.h"