From bce83e9836f7948db692b131918b8e4030d649bc Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Sat, 9 Jul 2022 08:05:16 +0000 Subject: [PATCH] glibc: update to 2.36 --- packages/devel/glibc/package.mk | 6 +- ...sing-convert-scm-timestamps-BZ-28860.patch | 31 ---- .../glibc-fix-dns-with-broken-routers.patch | 147 +++++++++--------- 3 files changed, 79 insertions(+), 105 deletions(-) delete mode 100644 packages/devel/glibc/patches/glibc-0001-linux-fix-missing-convert-scm-timestamps-BZ-28860.patch diff --git a/packages/devel/glibc/package.mk b/packages/devel/glibc/package.mk index 1cbac45f9a..3f6fb4c0ee 100644 --- a/packages/devel/glibc/package.mk +++ b/packages/devel/glibc/package.mk @@ -3,8 +3,8 @@ # Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv) PKG_NAME="glibc" -PKG_VERSION="2.35" -PKG_SHA256="5123732f6b67ccd319305efd399971d58592122bcc2a6518a1bd2510dd0cf52e" +PKG_VERSION="2.36" +PKG_SHA256="1c959fea240906226062cb4b1e7ebce71a9f0e3c0836c09e7e3423d434fcfe75" PKG_LICENSE="GPL" PKG_SITE="https://www.gnu.org/software/libc/" PKG_URL="https://ftp.gnu.org/pub/gnu/glibc/${PKG_NAME}-${PKG_VERSION}.tar.xz" @@ -27,7 +27,7 @@ PKG_CONFIGURE_OPTS_TARGET="BASH_SHELL=/bin/sh \ --with-__thread \ --with-binutils=${BUILD}/toolchain/bin \ --with-headers=${SYSROOT_PREFIX}/usr/include \ - --enable-kernel=5.10.0 \ + --enable-kernel=5.15.0 \ --without-cvs \ --without-gd \ --disable-build-nscd \ diff --git a/packages/devel/glibc/patches/glibc-0001-linux-fix-missing-convert-scm-timestamps-BZ-28860.patch b/packages/devel/glibc/patches/glibc-0001-linux-fix-missing-convert-scm-timestamps-BZ-28860.patch deleted file mode 100644 index e8ebe7c66f..0000000000 --- a/packages/devel/glibc/patches/glibc-0001-linux-fix-missing-convert-scm-timestamps-BZ-28860.patch +++ /dev/null @@ -1,31 +0,0 @@ -From patchwork Thu Feb 3 20:07:40 2022 -Subject: [COMMITTED] linux: Fix missing __convert_scm_timestamps (BZ #28860) -Date: Thu, 3 Feb 2022 17:07:40 -0300 -From: Adhemerval Zanella - -Commit 948ce73b31 made recvmsg/recvmmsg to always call -__convert_scm_timestamps for 64 bit time_t symbol, so adjust it to -always build it for __TIMESIZE != 64. - -It fixes build for architecture with 32 bit time_t support when -configured with minimum kernel of 5.1. ---- - sysdeps/unix/sysv/linux/convert_scm_timestamps.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/sysdeps/unix/sysv/linux/convert_scm_timestamps.c b/sysdeps/unix/sysv/linux/convert_scm_timestamps.c -index 82171bf325..dfc8c2beff 100644 ---- a/sysdeps/unix/sysv/linux/convert_scm_timestamps.c -+++ b/sysdeps/unix/sysv/linux/convert_scm_timestamps.c -@@ -16,9 +16,9 @@ - License along with the GNU C Library; if not, see - . */ - --#include -+#include - --#ifndef __ASSUME_TIME64_SYSCALLS -+#if __TIMESIZE != 64 - # include - # include - # include diff --git a/packages/devel/glibc/patches/glibc-fix-dns-with-broken-routers.patch b/packages/devel/glibc/patches/glibc-fix-dns-with-broken-routers.patch index 4bce319238..6e04bf1496 100644 --- a/packages/devel/glibc/patches/glibc-fix-dns-with-broken-routers.patch +++ b/packages/devel/glibc/patches/glibc-fix-dns-with-broken-routers.patch @@ -9,85 +9,90 @@ Date: Tue Oct 1 12:09:07 2013 +0300 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -730,6 +730,38 @@ gaih_inet (const char *name, const struc - if (res_ctx == NULL) - no_more = 1; + if (res_ctx == NULL) + no_more = 1; -+ /* AI_ADDRCONFIG determines whether or not we should suppress any -+ * hostname lookups. If the local host has only IPv4 interfaces, -+ * then suppress lookups for IPv6 addresses, and vice versa; if -+ * the local host has only IPv6 interfaces, suppress any lookups -+ * for IPv4 addresses.. -+ * -+ * Link-local IPv6 addresses and loopback addresses of either -+ * family are ignored when determining whether or not the host has -+ * an interface of the given address family, cf. __check_pf(). -+ * -+ * This logic is only applied for AF_UNSPEC. If the caller -+ * explicitly requested an address family, give him what he asked -+ * for. -+ * -+ * If we didn't find any interfaces of either address family, -+ * we ignore AI_ADDRCONFIG and return all available resutlts. */ -+ int suppress_af = 0; -+ if (req->ai_family == AF_UNSPEC) -+ { -+ struct in6addrinfo *in6ai = NULL; -+ size_t in6ailen = 0; -+ bool seen_ipv4 = false; -+ bool seen_ipv6 = false; -+ __check_pf (&seen_ipv4, &seen_ipv6, &in6ai, &in6ailen); -+ __free_in6ai (in6ai); ++ /* AI_ADDRCONFIG determines whether or not we should suppress any ++ * hostname lookups. If the local host has only IPv4 interfaces, ++ * then suppress lookups for IPv6 addresses, and vice versa; if ++ * the local host has only IPv6 interfaces, suppress any lookups ++ * for IPv4 addresses.. ++ * ++ * Link-local IPv6 addresses and loopback addresses of either ++ * family are ignored when determining whether or not the host has ++ * an interface of the given address family, cf. __check_pf(). ++ * ++ * This logic is only applied for AF_UNSPEC. If the caller ++ * explicitly requested an address family, give him what he asked ++ * for. ++ * ++ * If we didn't find any interfaces of either address family, ++ * we ignore AI_ADDRCONFIG and return all available resutlts. */ ++ int suppress_af = 0; ++ if (req->ai_family == AF_UNSPEC) ++ { ++ struct in6addrinfo *in6ai = NULL; ++ size_t in6ailen = 0; ++ bool seen_ipv4 = false; ++ bool seen_ipv6 = false; ++ __check_pf (&seen_ipv4, &seen_ipv6, &in6ai, &in6ailen); ++ __free_in6ai (in6ai); + -+ if(seen_ipv4 && !seen_ipv6) -+ suppress_af = AF_INET6; -+ else if(seen_ipv6 && !seen_ipv4) -+ suppress_af = AF_INET; -+ } ++ if(seen_ipv4 && !seen_ipv6) ++ suppress_af = AF_INET6; ++ else if(seen_ipv6 && !seen_ipv4) ++ suppress_af = AF_INET; ++ } + - while (!no_more) - { - no_data = 0; + while (!no_more) + { + no_data = 0; @@ -737,7 +769,7 @@ gaih_inet (const char *name, const struc - /* gethostbyname4_r sends out parallel A and AAAA queries and - is thus only suitable for PF_UNSPEC. */ -- if (req->ai_family == PF_UNSPEC) -+ if (req->ai_family == PF_UNSPEC && !suppress_af) - fct4 = __nss_lookup_function (nip, "gethostbyname4_r"); + /* gethostbyname4_r sends out parallel A and AAAA queries and + is thus only suitable for PF_UNSPEC. */ +- if (req->ai_family == PF_UNSPEC) ++ if (req->ai_family == PF_UNSPEC && !suppress_af) + fct4 = __nss_lookup_function (nip, "gethostbyname4_r"); - if (fct4 != NULL) -@@ -826,20 +858,22 @@ gaih_inet (const char *name, const struc + if (fct4 != NULL) +@@ -826,25 +858,27 @@ gaih_inet (const char *name, const struc - if (fct != NULL) + if (fct != NULL) + { +- if (req->ai_family == AF_INET6 +- || req->ai_family == AF_UNSPEC) ++ if ((req->ai_family == AF_INET6 ++ || req->ai_family == AF_UNSPEC) ++ && suppress_af != AF_INET6) + { + if ((result = gethosts (fct, AF_INET6, name, req, tmpbuf, + res, &status, &no_data)) != 0) { -- if (req->ai_family == AF_INET6 -- || req->ai_family == AF_UNSPEC) -+ if ((req->ai_family == AF_INET6 -+ || req->ai_family == AF_UNSPEC) -+ && suppress_af != AF_INET6) - { - gethosts (AF_INET6); - no_inet6_data = no_data; - inet6_status = status; - } -- if (req->ai_family == AF_INET -- || req->ai_family == AF_UNSPEC -- || (req->ai_family == AF_INET6 -- && (req->ai_flags & AI_V4MAPPED) -- /* Avoid generating the mapped addresses if we -- know we are not going to need them. */ -- && ((req->ai_flags & AI_ALL) || !got_ipv6))) -+ if ((req->ai_family == AF_INET -+ || req->ai_family == AF_UNSPEC -+ || (req->ai_family == AF_INET6 -+ && (req->ai_flags & AI_V4MAPPED) -+ /* Avoid generating the mapped addresses if we -+ know we are not going to need them. */ -+ && ((req->ai_flags & AI_ALL) || !got_ipv6))) -+ && suppress_af != AF_INET) - { - gethosts (AF_INET); - + __resolv_context_put (res_ctx); + goto out; + } + no_inet6_data = no_data; + inet6_status = status; + } +- if (req->ai_family == AF_INET +- || req->ai_family == AF_UNSPEC +- || (req->ai_family == AF_INET6 +- && (req->ai_flags & AI_V4MAPPED) +- /* Avoid generating the mapped addresses if we +- know we are not going to need them. */ +- && ((req->ai_flags & AI_ALL) || !res->got_ipv6))) ++ if ((req->ai_family == AF_INET ++ || req->ai_family == AF_UNSPEC ++ || (req->ai_family == AF_INET6 ++ && (req->ai_flags & AI_V4MAPPED) ++ /* Avoid generating the mapped addresses if we ++ know we are not going to need them. */ ++ && ((req->ai_flags & AI_ALL) || !res->got_ipv6))) ++ && suppress_af != AF_INET) + { + if ((result = gethosts (fct, AF_INET, name, req, tmpbuf, + res, &status, &no_data)) != 0) --- a/sysdeps/unix/sysv/linux/check_pf.c +++ b/sysdeps/unix/sysv/linux/check_pf.c @@ -224,7 +224,8 @@ make_request (int fd, pid_t pid)