Re-run res_init() when resolv.conf changes

libc caches the contents of resolv.conf, so if it changes (eg, because
the network state changed), we need re-run res_init().

http://bugzilla.gnome.org/show_bug.cgi?id=584246
This commit is contained in:
Dan Winship
2009-08-19 12:07:53 -04:00
parent 6db03d73a4
commit 021dd960cf
5 changed files with 132 additions and 24 deletions

View File

@@ -56,6 +56,10 @@
#include <sys/socket.h>
#include <sys/un.h>
#ifndef _PATH_RESCONF
#define _PATH_RESCONF "/etc/resolv.conf"
#endif
#endif
G_BEGIN_DECLS