glibc: update to 2.36

This commit is contained in:
Rudi Heitbaum 2022-07-09 08:05:16 +00:00
parent c1e42790f8
commit bce83e9836
3 changed files with 79 additions and 105 deletions

View File

@ -3,8 +3,8 @@
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv) # Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="glibc" PKG_NAME="glibc"
PKG_VERSION="2.35" PKG_VERSION="2.36"
PKG_SHA256="5123732f6b67ccd319305efd399971d58592122bcc2a6518a1bd2510dd0cf52e" PKG_SHA256="1c959fea240906226062cb4b1e7ebce71a9f0e3c0836c09e7e3423d434fcfe75"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="https://www.gnu.org/software/libc/" PKG_SITE="https://www.gnu.org/software/libc/"
PKG_URL="https://ftp.gnu.org/pub/gnu/glibc/${PKG_NAME}-${PKG_VERSION}.tar.xz" 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-__thread \
--with-binutils=${BUILD}/toolchain/bin \ --with-binutils=${BUILD}/toolchain/bin \
--with-headers=${SYSROOT_PREFIX}/usr/include \ --with-headers=${SYSROOT_PREFIX}/usr/include \
--enable-kernel=5.10.0 \ --enable-kernel=5.15.0 \
--without-cvs \ --without-cvs \
--without-gd \ --without-gd \
--disable-build-nscd \ --disable-build-nscd \

View File

@ -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 <adhemerval.zanella@linaro.org>
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
<https://www.gnu.org/licenses/>. */
-#include <kernel-features.h>
+#include <bits/timesize.h>
-#ifndef __ASSUME_TIME64_SYSCALLS
+#if __TIMESIZE != 64
# include <stdint.h>
# include <string.h>
# include <sys/socket.h>

View File

@ -9,85 +9,90 @@ Date: Tue Oct 1 12:09:07 2013 +0300
--- a/sysdeps/posix/getaddrinfo.c --- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c
@@ -730,6 +730,38 @@ gaih_inet (const char *name, const struc @@ -730,6 +730,38 @@ gaih_inet (const char *name, const struc
if (res_ctx == NULL) if (res_ctx == NULL)
no_more = 1; no_more = 1;
+ /* AI_ADDRCONFIG determines whether or not we should suppress any + /* AI_ADDRCONFIG determines whether or not we should suppress any
+ * hostname lookups. If the local host has only IPv4 interfaces, + * hostname lookups. If the local host has only IPv4 interfaces,
+ * then suppress lookups for IPv6 addresses, and vice versa; if + * then suppress lookups for IPv6 addresses, and vice versa; if
+ * the local host has only IPv6 interfaces, suppress any lookups + * the local host has only IPv6 interfaces, suppress any lookups
+ * for IPv4 addresses.. + * for IPv4 addresses..
+ * + *
+ * Link-local IPv6 addresses and loopback addresses of either + * Link-local IPv6 addresses and loopback addresses of either
+ * family are ignored when determining whether or not the host has + * family are ignored when determining whether or not the host has
+ * an interface of the given address family, cf. __check_pf(). + * an interface of the given address family, cf. __check_pf().
+ * + *
+ * This logic is only applied for AF_UNSPEC. If the caller + * This logic is only applied for AF_UNSPEC. If the caller
+ * explicitly requested an address family, give him what he asked + * explicitly requested an address family, give him what he asked
+ * for. + * for.
+ * + *
+ * If we didn't find any interfaces of either address family, + * If we didn't find any interfaces of either address family,
+ * we ignore AI_ADDRCONFIG and return all available resutlts. */ + * we ignore AI_ADDRCONFIG and return all available resutlts. */
+ int suppress_af = 0; + int suppress_af = 0;
+ if (req->ai_family == AF_UNSPEC) + if (req->ai_family == AF_UNSPEC)
+ { + {
+ struct in6addrinfo *in6ai = NULL; + struct in6addrinfo *in6ai = NULL;
+ size_t in6ailen = 0; + size_t in6ailen = 0;
+ bool seen_ipv4 = false; + bool seen_ipv4 = false;
+ bool seen_ipv6 = false; + bool seen_ipv6 = false;
+ __check_pf (&seen_ipv4, &seen_ipv6, &in6ai, &in6ailen); + __check_pf (&seen_ipv4, &seen_ipv6, &in6ai, &in6ailen);
+ __free_in6ai (in6ai); + __free_in6ai (in6ai);
+ +
+ if(seen_ipv4 && !seen_ipv6) + if(seen_ipv4 && !seen_ipv6)
+ suppress_af = AF_INET6; + suppress_af = AF_INET6;
+ else if(seen_ipv6 && !seen_ipv4) + else if(seen_ipv6 && !seen_ipv4)
+ suppress_af = AF_INET; + suppress_af = AF_INET;
+ } + }
+ +
while (!no_more) while (!no_more)
{ {
no_data = 0; no_data = 0;
@@ -737,7 +769,7 @@ gaih_inet (const char *name, const struc @@ -737,7 +769,7 @@ gaih_inet (const char *name, const struc
/* gethostbyname4_r sends out parallel A and AAAA queries and /* gethostbyname4_r sends out parallel A and AAAA queries and
is thus only suitable for PF_UNSPEC. */ is thus only suitable for PF_UNSPEC. */
- if (req->ai_family == PF_UNSPEC) - if (req->ai_family == PF_UNSPEC)
+ if (req->ai_family == PF_UNSPEC && !suppress_af) + if (req->ai_family == PF_UNSPEC && !suppress_af)
fct4 = __nss_lookup_function (nip, "gethostbyname4_r"); fct4 = __nss_lookup_function (nip, "gethostbyname4_r");
if (fct4 != NULL) if (fct4 != NULL)
@@ -826,20 +858,22 @@ gaih_inet (const char *name, const struc @@ -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 __resolv_context_put (res_ctx);
- || req->ai_family == AF_UNSPEC) goto out;
+ if ((req->ai_family == AF_INET6 }
+ || req->ai_family == AF_UNSPEC) no_inet6_data = no_data;
+ && suppress_af != AF_INET6) inet6_status = status;
{ }
gethosts (AF_INET6); - if (req->ai_family == AF_INET
no_inet6_data = no_data; - || req->ai_family == AF_UNSPEC
inet6_status = status; - || (req->ai_family == AF_INET6
} - && (req->ai_flags & AI_V4MAPPED)
- if (req->ai_family == AF_INET - /* Avoid generating the mapped addresses if we
- || req->ai_family == AF_UNSPEC - know we are not going to need them. */
- || (req->ai_family == AF_INET6 - && ((req->ai_flags & AI_ALL) || !res->got_ipv6)))
- && (req->ai_flags & AI_V4MAPPED) + if ((req->ai_family == AF_INET
- /* Avoid generating the mapped addresses if we + || req->ai_family == AF_UNSPEC
- know we are not going to need them. */ + || (req->ai_family == AF_INET6
- && ((req->ai_flags & AI_ALL) || !got_ipv6))) + && (req->ai_flags & AI_V4MAPPED)
+ if ((req->ai_family == AF_INET + /* Avoid generating the mapped addresses if we
+ || req->ai_family == AF_UNSPEC + know we are not going to need them. */
+ || (req->ai_family == AF_INET6 + && ((req->ai_flags & AI_ALL) || !res->got_ipv6)))
+ && (req->ai_flags & AI_V4MAPPED) + && suppress_af != AF_INET)
+ /* Avoid generating the mapped addresses if we {
+ know we are not going to need them. */ if ((result = gethosts (fct, AF_INET, name, req, tmpbuf,
+ && ((req->ai_flags & AI_ALL) || !got_ipv6))) res, &status, &no_data)) != 0)
+ && suppress_af != AF_INET)
{
gethosts (AF_INET);
--- a/sysdeps/unix/sysv/linux/check_pf.c --- a/sysdeps/unix/sysv/linux/check_pf.c
+++ b/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) @@ -224,7 +224,8 @@ make_request (int fd, pid_t pid)