SHA256
1
0
forked from pool/glibc

- Remove stale resolv.dynamic.diff patch file

OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=25
This commit is contained in:
Petr Baudis 2010-04-26 20:11:02 +00:00 committed by Git OBS Bridge
parent b87c70fd9e
commit b161019527
2 changed files with 5 additions and 33 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Apr 26 22:09:40 CEST 2010 - pbaudis@suse.cz
- Remove stale resolv.dynamic.diff patch file
-------------------------------------------------------------------
Thu Apr 22 08:30:50 CEST 2010 - meissner@suse.de

View File

@ -1,33 +0,0 @@
Index: resolv/res_libc.c
===================================================================
--- resolv/res_libc.c.orig
+++ resolv/res_libc.c
@@ -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 @@ int
__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);