From 4b173045e97ab47f92bc27e9bef3a04f5742b263 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Fri, 13 Nov 2009 21:37:18 +0100 Subject: libc/glibc: add 2.10.1 Woo... It seems the glibc guys finally decided that tarballs were not deprecated, in fact. The patchset was vampirised from Gentoo (kudos, guys!), and applies to glibc+ports, so that's why it's been added as a patchset against ports, not against glibc. --- .../glibc/ports-2.10.1/180-resolv-dynamic.patch | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 patches/glibc/ports-2.10.1/180-resolv-dynamic.patch (limited to 'patches/glibc/ports-2.10.1/180-resolv-dynamic.patch') diff --git a/patches/glibc/ports-2.10.1/180-resolv-dynamic.patch b/patches/glibc/ports-2.10.1/180-resolv-dynamic.patch new file mode 100644 index 00000000..ea88fa0f --- /dev/null +++ b/patches/glibc/ports-2.10.1/180-resolv-dynamic.patch @@ -0,0 +1,39 @@ +ripped from SuSE + +if /etc/resolv.conf is updated, then make sure applications +already running get the updated information. + +http://bugs.gentoo.org/177416 + +diff -durN glibc-2.10.1.orig/resolv/res_libc.c glibc-2.10.1/resolv/res_libc.c +--- glibc-2.10.1.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 ++++ glibc-2.10.1/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + + /* The following bit is copied from res_data.c (where it is #ifdef'ed +@@ -95,6 +96,20 @@ + __res_maybe_init (res_state resp, int preinit) + { + if (resp->options & RES_INIT) { ++ static time_t last_mtime, last_check; ++ time_t now; ++ struct stat statbuf; ++ ++ time (&now); ++ if (now != last_check) { ++ last_check = now; ++ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { ++ last_mtime = statbuf.st_mtime; ++ atomicinclock (lock); ++ atomicinc (__res_initstamp); ++ atomicincunlock (lock); ++ } ++ } + if (__res_initstamp != resp->_u._ext.initstamp) { + if (resp->nscount > 0) + __res_iclose (resp, true); -- cgit v1.2.3