r5568 - in glibc-package/branches/eglibc-2.17/debian: . patches patches/hurd-i386
Author: sthibault
Date: 2013-05-09 09:46:08 +0000 (Thu, 09 May 2013)
New Revision: 5568
Added:
glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/submitted-handle-eprototype.diff
Modified:
glibc-package/branches/eglibc-2.17/debian/changelog
glibc-package/branches/eglibc-2.17/debian/patches/series.hurd-i386
Log:
patches/hurd-i386/submitted-handle-eprototype.diff: New brown-tape patch to
fixup DNS resolution on hurd-i386. Better solution pending.
Modified: glibc-package/branches/eglibc-2.17/debian/changelog
===================================================================
--- glibc-package/branches/eglibc-2.17/debian/changelog 2013-05-09 08:31:08 UTC (rev 5567)
+++ glibc-package/branches/eglibc-2.17/debian/changelog 2013-05-09 09:46:08 UTC (rev 5568)
@@ -1,8 +1,13 @@
eglibc (2.17-2) UNRELEASED; urgency=low
+ [ Adam Conrad ]
* debian/patches/any/unsubmitted-cloexec-conditional.diff: Catch yet
another unconditional O_CLOEXEC and conditionalize it for freebsd.
+ [ Samuel Thibault ]
+ * patches/hurd-i386/submitted-handle-eprototype.diff: New brown-tape patch to
+ fixup DNS resolution on hurd-i386. Better solution pending.
+
-- Adam Conrad <adconrad@0c3.net> Tue, 07 May 2013 13:58:05 -0600
eglibc (2.17-1) unstable; urgency=low
Added: glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/submitted-handle-eprototype.diff
===================================================================
--- glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/submitted-handle-eprototype.diff (rev 0)
+++ glibc-package/branches/eglibc-2.17/debian/patches/hurd-i386/submitted-handle-eprototype.diff 2013-05-09 09:46:08 UTC (rev 5568)
@@ -0,0 +1,95 @@
+http://sourceware.org/ml/libc-alpha/2013-02/msg00092.html
+
+Handle EPROTOTYPE for socket invocations with SOCK_* flags
+
+If SOCK_CLOEXEC and SOCK_NONBLOCK are defined but not __ASSUME_SOCK_CLOEXEC,
+trying to use them as socket type in invocations of socket will return
+EPROTOTYPE if socket and socketpair do not handle those flags; EPROTOTYPE is
+not considered properly, behaving as if those flags were actually supported.
+
+Checking for the EPROTOTYPE errno in addition to EINVAL handles the situation.
+
+2013-02-06 Pino Toscano <toscano.pino@tiscali.it>
+
+ * nscd/connections.c (nscd_init) [!defined __ASSUME_SOCK_CLOEXEC]:
+ Check for EPROTOTYPE in addition to EINVAL.
+ * nscd/nscd_helper.c (open_socket) [defined SOCK_CLOEXEC]
+ [!defined __ASSUME_SOCK_CLOEXEC]: Likewise.
+ * resolv/res_send.c (reopen) [!defined __ASSUME_SOCK_CLOEXEC]: Likewise.
+ * sunrpc/clnt_udp.c (__libc_clntudp_bufcreate) [defined SOCK_NONBLOCK]
+ [!defined __ASSUME_SOCK_CLOEXEC]: Likewise.
+ * misc/syslog.c (openlog_internal) [defined SOCK_CLOEXEC]
+ [!defined __ASSUME_SOCK_CLOEXEC]: Likewise.
+
+---
+ misc/syslog.c | 2 +-
+ nscd/connections.c | 2 +-
+ nscd/nscd_helper.c | 2 +-
+ resolv/res_send.c | 4 ++--
+ sunrpc/clnt_udp.c | 2 +-
+ 5 files changed, 6 insertions(+), 6 deletions(-)
+
+--- a/nscd/connections.c
++++ b/nscd/connections.c
+@@ -856,7 +856,7 @@ cannot set socket to close on exec: %s;
+ sock = socket (AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0);
+ #ifndef __ASSUME_SOCK_CLOEXEC
+ if (have_sock_cloexec == 0)
+- have_sock_cloexec = sock != -1 || errno != EINVAL ? 1 : -1;
++ have_sock_cloexec = sock != -1 || (errno != EINVAL && errno != EPROTOTYPE) ? 1 : -1;
+ #endif
+ }
+ #ifndef __ASSUME_SOCK_CLOEXEC
+--- a/nscd/nscd_helper.c
++++ b/nscd/nscd_helper.c
+@@ -172,7 +172,7 @@ open_socket (request_type type, const ch
+ sock = __socket (PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0);
+ # ifndef __ASSUME_SOCK_CLOEXEC
+ if (__have_sock_cloexec == 0)
+- __have_sock_cloexec = sock != -1 || errno != EINVAL ? 1 : -1;
++ __have_sock_cloexec = sock != -1 || (errno != EINVAL && errno != EPROTOTYPE) ? 1 : -1;
+ # endif
+ }
+ #endif
+--- a/resolv/res_send.c
++++ b/resolv/res_send.c
+@@ -925,7 +925,7 @@ reopen (res_state statp, int *terrno, in
+ if (__have_o_nonblock == 0)
+ __have_o_nonblock
+ = (EXT(statp).nssocks[ns] == -1
+- && errno == EINVAL ? -1 : 1);
++ && (errno == EINVAL || errno == EPROTOTYPE) ? -1 : 1);
+ #endif
+ }
+ if (__builtin_expect (__have_o_nonblock < 0, 0))
+@@ -943,7 +943,7 @@ reopen (res_state statp, int *terrno, in
+ if (__have_o_nonblock == 0)
+ __have_o_nonblock
+ = (EXT(statp).nssocks[ns] == -1
+- && errno == EINVAL ? -1 : 1);
++ && (errno == EINVAL || errno == EPROTOTYPE) ? -1 : 1);
+ #endif
+ }
+ if (__builtin_expect (__have_o_nonblock < 0, 0))
+--- a/sunrpc/clnt_udp.c
++++ b/sunrpc/clnt_udp.c
+@@ -179,7 +179,7 @@ __libc_clntudp_bufcreate (struct sockadd
+ IPPROTO_UDP);
+ # ifndef __ASSUME_SOCK_CLOEXEC
+ if (__have_sock_cloexec == 0)
+- __have_sock_cloexec = *sockp >= 0 || errno != EINVAL ? 1 : -1;
++ __have_sock_cloexec = *sockp >= 0 || (errno != EINVAL && errno != EPROTOTYPE) ? 1 : -1;
+ # endif
+ }
+ #endif
+--- a/misc/syslog.c
++++ b/misc/syslog.c
+@@ -357,7 +357,7 @@ openlog_internal(const char *ident, int
+ if (__have_sock_cloexec == 0)
+ __have_sock_cloexec
+ = ((LogFile != -1
+- || errno != EINVAL)
++ || (errno != EINVAL && errno != EPROTOTYPE))
+ ? 1 : -1);
+ }
+ # endif
Modified: glibc-package/branches/eglibc-2.17/debian/patches/series.hurd-i386
===================================================================
--- glibc-package/branches/eglibc-2.17/debian/patches/series.hurd-i386 2013-05-09 08:31:08 UTC (rev 5567)
+++ glibc-package/branches/eglibc-2.17/debian/patches/series.hurd-i386 2013-05-09 09:46:08 UTC (rev 5568)
@@ -10,3 +10,4 @@
hurd-i386/tg-fcntl-internal.h.diff
hurd-i386/tg-pagesize.diff
hurd-i386/local-disable-tst-xmmymm.diff
+hurd-i386/submitted-handle-eprototype.diff
Reply to: