unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 212ab0a985c7da23afc98e84cd70c8055df21745 1832 bytes (raw)
name: gnu/packages/patches/glibc-2-26-0026.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
 
From 7966331555df43bb7e2a55ce5a17a330e57f487f Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Mon, 4 Sep 2017 11:25:34 +0200
Subject: [PATCH 26/90] getaddrinfo: Return EAI_NODATA if gethostbyname2_r
 reports NO_DATA [BZ #21922]

(cherry picked from commit 5f8340f583fe3d4f5734bd2371c5a45ecff2db0d)

diff --git a/ChangeLog b/ChangeLog
index c58cd5ccd0..f46bbb7c0d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-09-01  Florian Weimer  <fweimer@redhat.com>
+
+	[BZ #21922]
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): Report EAI_NODATA error
+	coming from gethostbyname2_r.
+
 2017-09-01  Florian Weimer  <fweimer@redhat.com>
 
 	* sysdeps/posix/getaddrinfo.c (gaih_inet): Only use h_errno if
diff --git a/NEWS b/NEWS
index 756e849643..97eb21e868 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,7 @@ The following bugs are resolved with this release:
   [21780] posix: Set p{read,write}v2 to return ENOTSUP
   [21871] x86-64: Use _dl_runtime_resolve_opt only with AVX512F
   [21885] getaddrinfo: Release resolver context on error in gethosts
+  [21922] getaddrinfo with AF_INET(6) returns EAI_NONAME, not EAI_NODATA
   [21930] Do not use __builtin_types_compatible_p in C++ mode
   [21932] Unpaired __resolv_context_get in generic get*_r implementation
   [21941] powerpc: Restrict xssqrtqp operands to Vector Registers
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 9d9e7e2bf2..0cf87c224d 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -619,6 +619,14 @@ gaih_inet (const char *name, const struct gaih_service *service,
 			}
 		      *pat = addrmem;
 		    }
+		  else
+		    {
+		      if (h_errno == NO_DATA)
+			result = -EAI_NODATA;
+		      else
+			result = -EAI_NONAME;
+		      goto free_and_return;
+		    }
 		}
 	      else
 		{

debug log:

solving 212ab0a98 ...
found 212ab0a98 in https://yhetil.org/guix-patches/87ine0pjiu.fsf@fastmail.com/ ||
	https://yhetil.org/guix-patches/87d148pe57.fsf@fastmail.com/

applying [1/1] https://yhetil.org/guix-patches/87ine0pjiu.fsf@fastmail.com/
diff --git a/gnu/packages/patches/glibc-2-26-0026.patch b/gnu/packages/patches/glibc-2-26-0026.patch
new file mode 100644
index 000000000..212ab0a98

1:27: trailing whitespace.
 
1:28: space before tab in indent.
 	* sysdeps/posix/getaddrinfo.c (gaih_inet): Only use h_errno if
1:46: space before tab in indent.
 			}
1:47: space before tab in indent.
 		      *pat = addrmem;
1:48: space before tab in indent.
 		    }
Checking patch gnu/packages/patches/glibc-2-26-0026.patch...
Applied patch gnu/packages/patches/glibc-2-26-0026.patch cleanly.
warning: squelched 3 whitespace errors
warning: 8 lines add whitespace errors.

skipping https://yhetil.org/guix-patches/87d148pe57.fsf@fastmail.com/ for 212ab0a98
index at:
100644 212ab0a985c7da23afc98e84cd70c8055df21745	gnu/packages/patches/glibc-2-26-0026.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).