diff options
author | Frans Meulenbroeks <fransmeulenbroeks@gmail.com> | 2010-08-15 19:40:43 +0200 |
---|---|---|
committer | Frans Meulenbroeks <fransmeulenbroeks@gmail.com> | 2010-08-15 19:40:43 +0200 |
commit | d6d14c33e9f90e05d04d9022babe53260578561b (patch) | |
tree | 17f6dbfa5b2b4ed16328e6f102383b7f717d4edd /recipes/glibc/glibc-2.6.1/glibc-2.5-local-dynamic-resolvconf.patch | |
parent | e0bda104a2b2e9e85a478ad15e473358ae992352 (diff) |
glibc-2.6.1: added missing files
we lost some files in this commit:
http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=dd7a49ac1158de431ad5dc9089c49f737a8123a6
this patch adds the missing files
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/glibc/glibc-2.6.1/glibc-2.5-local-dynamic-resolvconf.patch')
-rw-r--r-- | recipes/glibc/glibc-2.6.1/glibc-2.5-local-dynamic-resolvconf.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/recipes/glibc/glibc-2.6.1/glibc-2.5-local-dynamic-resolvconf.patch b/recipes/glibc/glibc-2.6.1/glibc-2.5-local-dynamic-resolvconf.patch new file mode 100644 index 0000000000..e137287dd1 --- /dev/null +++ b/recipes/glibc/glibc-2.6.1/glibc-2.5-local-dynamic-resolvconf.patch @@ -0,0 +1,41 @@ +# All lines beginning with `# DP:' are a description of the patch. +# DP: Description: allow dynamic long-running processes to +# DP: re-read a dynamically updated resolv.conf on the fly +# DP: Dpatch author: Adam Conrad <adconrad@ubuntu.com> +# DP: Patch author: Thorsten Kukuk <kukuk@suse.de> +# DP: Upstream status: Ubuntu-Specific +# DP: Date: 2006-01-13 08:14:21 UTC + +Index: resolv/res_libc.c +=================================================================== +--- resolv/res_libc.c.orig ++++ resolv/res_libc.c +@@ -22,7 +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 + out) since res_init() should go into libc.so but the rest of that +@@ -94,8 +94,17 @@ + int + __res_maybe_init (res_state resp, int preinit) + { +- if (resp->options & RES_INIT) { +- if (__res_initstamp != resp->_u._ext.initstamp) { ++ static time_t last_mtime; ++ struct stat statbuf; ++ int ret; ++ ++ ++ if (resp->options & RES_INIT) { ++ ret = stat (_PATH_RESCONF, &statbuf); ++ if (__res_initstamp != resp->_u._ext.initstamp ++ || (ret == 0) && (last_mtime != statbuf.st_mtime)) ++ { ++ last_mtime = statbuf.st_mtime; + if (resp->nscount > 0) { + __res_iclose (resp, true); + return __res_vinit (resp, 1); |