From b2a756baa6db68bcc9cc9e62be2b85d3ad942cd4 Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Tue, 8 Oct 2024 16:58:39 +0400 Subject: [PATCH] Enable IPv6 in meson build of libmicrohttpd under Windows --- kiwixbuild/dependencies/libmicrohttpd.py | 1 + .../patches/libmicrohttpd_meson_winet6.patch | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 kiwixbuild/patches/libmicrohttpd_meson_winet6.patch diff --git a/kiwixbuild/dependencies/libmicrohttpd.py b/kiwixbuild/dependencies/libmicrohttpd.py index d76c521..ca87ac3 100644 --- a/kiwixbuild/dependencies/libmicrohttpd.py +++ b/kiwixbuild/dependencies/libmicrohttpd.py @@ -21,6 +21,7 @@ class MicroHttpd(Dependency): patches = [ "libmicrohttpd_meson_pkgconfig.patch", "libmicrohttpd_meson_timeval_tvsec_size.patch", + "libmicrohttpd_meson_winet6.patch", ] class Builder(MesonBuilder): diff --git a/kiwixbuild/patches/libmicrohttpd_meson_winet6.patch b/kiwixbuild/patches/libmicrohttpd_meson_winet6.patch new file mode 100644 index 0000000..34c4eab --- /dev/null +++ b/kiwixbuild/patches/libmicrohttpd_meson_winet6.patch @@ -0,0 +1,15 @@ +--- libmicrohttpd-0.9.76_orig/meson.build 2024-10-08 15:53:53.370828250 +0400 ++++ libmicrohttpd-0.9.76/meson.build 2024-10-08 16:23:24.985668690 +0400 +@@ -77,7 +77,11 @@ + endforeach + + cdata.set('HAVE_ASSERT', cc.has_header_symbol('assert.h', 'assert')) +-cdata.set10('HAVE_INET6', cc.has_header_symbol('netinet/in.h', 'struct in6_addr')) ++if host_machine.system() == 'windows' ++ cdata.set10('HAVE_INET6', 1) ++else ++ cdata.set10('HAVE_INET6', cc.has_header_symbol('netinet/in.h', 'struct in6_addr')) ++endif + + functions = [ + 'accept4',