diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2009-03-28 13:34:41 +0000 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2009-03-28 13:34:41 +0000 |
commit | aeddc2708dfec1daf0dd71a9afd41bcd98fe6ee0 (patch) | |
tree | c1f02b666c42e7d0493064b072e8b80201f03aca /patches/glibc/2.9/250-resolv-dynamic.patch | |
parent | 91a189c7ba35f9a723c986c3b90873db0f4366b9 (diff) | |
download | crosstool-ng-aeddc2708dfec1daf0dd71a9afd41bcd98fe6ee0.tar.gz crosstool-ng-aeddc2708dfec1daf0dd71a9afd41bcd98fe6ee0.tar.bz2 crosstool-ng-aeddc2708dfec1daf0dd71a9afd41bcd98fe6ee0.zip |
Rename patch dir for glibc-2.9: version string is 2.9, not 2_9.
Diffstat (limited to 'patches/glibc/2.9/250-resolv-dynamic.patch')
-rw-r--r-- | patches/glibc/2.9/250-resolv-dynamic.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/patches/glibc/2.9/250-resolv-dynamic.patch b/patches/glibc/2.9/250-resolv-dynamic.patch new file mode 100644 index 00000000..66c33707 --- /dev/null +++ b/patches/glibc/2.9/250-resolv-dynamic.patch @@ -0,0 +1,44 @@ +Original patch from: gentoo/src/patchsets/glibc/2.9/1055_all_glibc-resolv-dynamic.patch + +-= BEGIN original header =- +ripped from SuSE + +if /etc/resolv.conf is updated, then make sure applications +already running get the updated information. + +http://bugs.gentoo.org/177416 + +-= END original header =- + +diff -durN glibc-2_9.orig/resolv/res_libc.c glibc-2_9/resolv/res_libc.c +--- glibc-2_9.orig/resolv/res_libc.c 2006-10-11 10:59:28.000000000 +0200 ++++ glibc-2_9/resolv/res_libc.c 2009-02-02 22:00:57.000000000 +0100 +@@ -22,6 +22,7 @@ + #include <arpa/nameser.h> + #include <resolv.h> + #include <bits/libc-lock.h> ++#include <sys/stat.h> + + + /* 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); |