From f383d281f429f6226c66069c8db09633f5d65d33 Mon Sep 17 00:00:00 2001 From: rumko Date: Wed, 31 Dec 2014 16:05:07 +0000 Subject: security/gnutls: Fix struct in6_addr being an incomplete type In lib/x509/rfc2818_hostname.c, ipv6 related structs are used, but at least on FreeBSD, arpa/inet.h does not contains the necessary structs. If netinet/in.h is present, we use it instead of arpa/inet.h. Reviewed by wiz --- security/gnutls/distinfo | 3 ++- security/gnutls/patches/patch-lib_system.h | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 security/gnutls/patches/patch-lib_system.h (limited to 'security/gnutls') diff --git a/security/gnutls/distinfo b/security/gnutls/distinfo index 1632350c94a..04f9c2f1474 100644 --- a/security/gnutls/distinfo +++ b/security/gnutls/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.110 2014/12/05 12:43:24 khorben Exp $ +$NetBSD: distinfo,v 1.111 2014/12/31 16:05:07 rumko Exp $ SHA1 (gnutls-3.2.20.tar.xz) = 6b104f737330ff2f6833b8c5d80e1cd2c3fcfb66 RMD160 (gnutls-3.2.20.tar.xz) = 02617d710a4dc9a81664176da22cd2e5062e6527 @@ -7,6 +7,7 @@ SHA1 (patch-ae) = b6402cc4a03f1b32792191518ed0c5596eb91c07 SHA1 (patch-gl_stdio.in.h) = cad0685b77a1abb74ac578695ceb5c1c74479a87 SHA1 (patch-lib_Makefile.in) = a75aa7bf9d493fae93b02d0ffdc82f538cc85737 SHA1 (patch-lib_nettle_rnd.c) = bbce9bbb61d2be625585f6c8ed5bda95f3a80344 +SHA1 (patch-lib_system.h) = fb67be62f1e889a665a65ab151ced24fa1ab3e2e SHA1 (patch-src_libopts_autoopts_options.h) = 60be5b43f23ba5978759c1e245781da7f9125071 SHA1 (patch-src_libopts_compat_compat.h) = 2e0a1be460917b2d7a8f6bdac698dad405143013 SHA1 (patch-src_libopts_makeshell.c) = c94e717027d078a081acd10eaec51a44dc4d42e1 diff --git a/security/gnutls/patches/patch-lib_system.h b/security/gnutls/patches/patch-lib_system.h new file mode 100644 index 00000000000..dd609e524c5 --- /dev/null +++ b/security/gnutls/patches/patch-lib_system.h @@ -0,0 +1,22 @@ +$NetBSD: patch-lib_system.h,v 1.1 2014/12/31 16:05:07 rumko Exp $ + +At least on FreeBSD, arpa/inet.h does not contain IPV6 +related structs. + +See https://savannah.gnu.org/support/?108713 + +--- lib/system.h.orig 2014-12-30 11:12:37.607361021 +0000 ++++ lib/system.h +@@ -98,7 +98,12 @@ int _gnutls_ucs2_to_utf8(const void *dat + int gnutls_system_global_init(void); + void gnutls_system_global_deinit(void); + ++#if defined(HAVE_NETINET_IN_H) ++#include ++#else + #include ++#endif ++ + #ifdef _WIN32 + # define inet_aton _gnutls_inet_aton + int inet_aton(const char *cp, struct in_addr *inp); -- cgit v1.2.3