diff options
author | Alexey Neyman <stilor@att.net> | 2017-02-07 15:53:53 -0800 |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2017-02-09 18:05:36 -0800 |
commit | ac4a37c8c43eca8443943c110521a39cec8bf5fc (patch) | |
tree | c92d906db51fdfd77ace5ccbcdc1a9cf11589172 /patches/glibc/ports-2.12.1/180-resolv-dynamic.patch | |
parent | fb6fe0d70baaf4a3b545aa56b7b25a8457ab1204 (diff) | |
download | crosstool-ng-ac4a37c8c43eca8443943c110521a39cec8bf5fc.tar.gz crosstool-ng-ac4a37c8c43eca8443943c110521a39cec8bf5fc.tar.bz2 crosstool-ng-ac4a37c8c43eca8443943c110521a39cec8bf5fc.zip |
Revert "patches: remove obsolete glibc patches"
This partially reverts commit 429b3e884662a3b9a72890aae23865501e66330f.
Bring back the patches for glibc 2.12 and newer. Propagate/refresh
some patches as needed.
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'patches/glibc/ports-2.12.1/180-resolv-dynamic.patch')
-rw-r--r-- | patches/glibc/ports-2.12.1/180-resolv-dynamic.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/patches/glibc/ports-2.12.1/180-resolv-dynamic.patch b/patches/glibc/ports-2.12.1/180-resolv-dynamic.patch new file mode 100644 index 00000000..8f74a537 --- /dev/null +++ b/patches/glibc/ports-2.12.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.12.1.orig/resolv/res_libc.c glibc-2.12.1/resolv/res_libc.c +--- glibc-2.12.1.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 ++++ glibc-2.12.1/resolv/res_libc.c 2009-11-13 00:49:59.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); |