From 713c4afcb4a74b0ab4dc4521a4ad45490d7e60cd Mon Sep 17 00:00:00 2001 From: Eric Blankenhorn Date: Wed, 22 Dec 2021 09:26:22 -0600 Subject: [PATCH 1/2] Fix missing include ws2tcpip.h for VS build --- wolfssl/wolfcrypt/wc_port.h | 1 + 1 file changed, 1 insertion(+) diff --git a/wolfssl/wolfcrypt/wc_port.h b/wolfssl/wolfcrypt/wc_port.h index eb4a4e0a4bc..910c29a6e41 100644 --- a/wolfssl/wolfcrypt/wc_port.h +++ b/wolfssl/wolfcrypt/wc_port.h @@ -618,6 +618,7 @@ #include #endif #include + #include #endif /* WOLFSSL_SGX */ #endif #elif defined(THREADX) From 1e4b13dfac1594f2be07100cdd63e3d58b45702c Mon Sep 17 00:00:00 2001 From: David Garske Date: Thu, 23 Dec 2021 15:25:25 -0800 Subject: [PATCH 2/2] Only include `ws2tcpip.h` if not user IO. --- src/sniffer.c | 2 +- wolfssl/wolfcrypt/wc_port.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sniffer.c b/src/sniffer.c index d9ebe11dc39..fe1db4e2467 100644 --- a/src/sniffer.c +++ b/src/sniffer.c @@ -77,7 +77,7 @@ #ifndef _WIN32 #include #else - #include + #include #endif #endif diff --git a/wolfssl/wolfcrypt/wc_port.h b/wolfssl/wolfcrypt/wc_port.h index 910c29a6e41..017787d3189 100644 --- a/wolfssl/wolfcrypt/wc_port.h +++ b/wolfssl/wolfcrypt/wc_port.h @@ -618,7 +618,9 @@ #include #endif #include - #include + #ifndef WOLFSSL_USER_IO + #include /* required for InetPton */ + #endif #endif /* WOLFSSL_SGX */ #endif #elif defined(THREADX)