]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix undefined ipi_spec_dst for cygwin build.
authorTristan Lelong <tlelong@google.com>
Mon, 5 Sep 2022 09:14:40 +0000 (11:14 +0200)
committerTomas Mraz <tomas@openssl.org>
Thu, 8 Sep 2022 05:54:30 +0000 (07:54 +0200)
The 'struct in_pktinfo' doesn't have a 'ipi_spec_dst' field on windows
OS which break cygwin builds of OpenSSL.

Signed-off-by: Tristan Lelong <tlelong@google.com>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19134)

crypto/bio/bss_dgram.c

index 09619e13a0970fcfb1ac764d3d7b68c98382aa04..e9fd2ee06dd035ede8b9d449e2b0c6dee2606013 100644 (file)
@@ -1125,7 +1125,9 @@ static int pack_local(BIO *b, MSGHDR_TYPE *mh, const BIO_ADDR *local) {
         cmsg->cmsg_type  = IP_PKTINFO;
 
         info = (struct in_pktinfo *)BIO_CMSG_DATA(cmsg);
+#   if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_CYGWIN)
         info->ipi_spec_dst      = local->s_in.sin_addr;
+#   endif
         info->ipi_addr.s_addr   = 0;
         info->ipi_ifindex       = 0;