summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaitao Liu <haitao.liu@windriver.com>2024-03-18 11:07:10 +0800
committerSteve Sakoman <steve@sakoman.com>2024-03-25 04:11:26 -1000
commite8d1874bf02028050dd34e471672e12b304b6ec3 (patch)
treef19c5c9ffccc82983652f95e325126d08a6244e8
parent1ca3aed8af148b8cce57d4939ba0fccfe1266d01 (diff)
downloadpoky-e8d1874bf02028050dd34e471672e12b304b6ec3.tar.gz
glibc: Fix subscript typos for get_nscd_addresses
Fix the following error: root@intel-x86-64:~# wget -6 http://localhost --2024-01-12 07:18:42-- http://localhost/ Resolving localhost... failed: No IPv4/IPv6 addresses for host. wget: unable to resolve host address 'localhost' Reference: https://sourceware.org/bugzilla/show_bug.cgi?id=29605 Upstream-patch: https://sourceware.org/git/?p=glibc.git;a=commit;h=c9226c03da0276593a0918eaa9a14835183343e8 (From OE-Core rev: 1b5405955c7c2579ed1f52522e2e177d0281fa33) Signed-off-by: Haitao Liu <haitao.liu@windriver.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-core/glibc/glibc/0002-get_nscd_addresses-Fix-subscript-typos-BZ-29605.patch40
-rw-r--r--meta/recipes-core/glibc/glibc_2.35.bb1
2 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/0002-get_nscd_addresses-Fix-subscript-typos-BZ-29605.patch b/meta/recipes-core/glibc/glibc/0002-get_nscd_addresses-Fix-subscript-typos-BZ-29605.patch
new file mode 100644
index 0000000000..629298c23e
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0002-get_nscd_addresses-Fix-subscript-typos-BZ-29605.patch
@@ -0,0 +1,40 @@
1From 707a878b655395f41b954bbed78008d1d9252f1a Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?J=C3=B6rg=20Sonnenberger?= <joerg@bec.de>
3Date: Mon, 26 Sep 2022 13:59:16 -0400
4Subject: [PATCH] get_nscd_addresses: Fix subscript typos [BZ #29605]
5
6Fix the subscript on air->family, which was accidentally set to COUNT
7when it should have remained as I.
8
9Resolves: BZ #29605
10
11Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=c9226c03da0276593a0918eaa9a14835183343e8]
12
13Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
14Signed-off-by: Haitao Liu <haitao.liu@windriver.com>
15---
16 sysdeps/posix/getaddrinfo.c | 6 +++---
17 1 file changed, 3 insertions(+), 3 deletions(-)
18
19diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
20index f4c08d6e3b..fa333ad6ec 100644
21--- a/sysdeps/posix/getaddrinfo.c
22+++ b/sysdeps/posix/getaddrinfo.c
23@@ -549,11 +549,11 @@ get_nscd_addresses (const char *name, const struct addrinfo *req,
24 at[count].addr[2] = htonl (0xffff);
25 }
26 else if (req->ai_family == AF_UNSPEC
27- || air->family[count] == req->ai_family)
28+ || air->family[i] == req->ai_family)
29 {
30- at[count].family = air->family[count];
31+ at[count].family = air->family[i];
32 memcpy (at[count].addr, addrs, size);
33- if (air->family[count] == AF_INET6)
34+ if (air->family[i] == AF_INET6)
35 res->got_ipv6 = true;
36 }
37 at[count].next = at + count + 1;
38--
392.35.5
40
diff --git a/meta/recipes-core/glibc/glibc_2.35.bb b/meta/recipes-core/glibc/glibc_2.35.bb
index 3ec6610d01..751427517f 100644
--- a/meta/recipes-core/glibc/glibc_2.35.bb
+++ b/meta/recipes-core/glibc/glibc_2.35.bb
@@ -60,6 +60,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
60 file://0024-fix-create-thread-failed-in-unprivileged-process-BZ-.patch \ 60 file://0024-fix-create-thread-failed-in-unprivileged-process-BZ-.patch \
61 \ 61 \
62 file://0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patch \ 62 file://0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patch \
63 file://0002-get_nscd_addresses-Fix-subscript-typos-BZ-29605.patch \
63 " 64 "
64S = "${WORKDIR}/git" 65S = "${WORKDIR}/git"
65B = "${WORKDIR}/build-${TARGET_SYS}" 66B = "${WORKDIR}/build-${TARGET_SYS}"