summaryrefslogtreecommitdiffstats
path: root/meta/packages/glibc/files/glibc-2.5-local-dynamic-resolvconf.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/glibc/files/glibc-2.5-local-dynamic-resolvconf.patch')
-rw-r--r--meta/packages/glibc/files/glibc-2.5-local-dynamic-resolvconf.patch41
1 files changed, 0 insertions, 41 deletions
diff --git a/meta/packages/glibc/files/glibc-2.5-local-dynamic-resolvconf.patch b/meta/packages/glibc/files/glibc-2.5-local-dynamic-resolvconf.patch
deleted file mode 100644
index e137287dd1..0000000000
--- a/meta/packages/glibc/files/glibc-2.5-local-dynamic-resolvconf.patch
+++ /dev/null
@@ -1,41 +0,0 @@
1# All lines beginning with `# DP:' are a description of the patch.
2# DP: Description: allow dynamic long-running processes to
3# DP: re-read a dynamically updated resolv.conf on the fly
4# DP: Dpatch author: Adam Conrad <adconrad@ubuntu.com>
5# DP: Patch author: Thorsten Kukuk <kukuk@suse.de>
6# DP: Upstream status: Ubuntu-Specific
7# DP: Date: 2006-01-13 08:14:21 UTC
8
9Index: resolv/res_libc.c
10===================================================================
11--- resolv/res_libc.c.orig
12+++ resolv/res_libc.c
13@@ -22,7 +22,7 @@
14 #include <arpa/nameser.h>
15 #include <resolv.h>
16 #include <bits/libc-lock.h>
17-
18+#include <sys/stat.h>
19
20 /* The following bit is copied from res_data.c (where it is #ifdef'ed
21 out) since res_init() should go into libc.so but the rest of that
22@@ -94,8 +94,17 @@
23 int
24 __res_maybe_init (res_state resp, int preinit)
25 {
26- if (resp->options & RES_INIT) {
27- if (__res_initstamp != resp->_u._ext.initstamp) {
28+ static time_t last_mtime;
29+ struct stat statbuf;
30+ int ret;
31+
32+
33+ if (resp->options & RES_INIT) {
34+ ret = stat (_PATH_RESCONF, &statbuf);
35+ if (__res_initstamp != resp->_u._ext.initstamp
36+ || (ret == 0) && (last_mtime != statbuf.st_mtime))
37+ {
38+ last_mtime = statbuf.st_mtime;
39 if (resp->nscount > 0) {
40 __res_iclose (resp, true);
41 return __res_vinit (resp, 1);