mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-06 07:58:44 +02:00
gresolver: remove unneeded call to res_init()
This call was needed once upon a time, when GResolver had subclasses that presumably relied on this. Nowadays, we have only GThreadedResolver, which does not need it. res_init() is dangerous because it modifies global state, so let's get rid of it.
This commit is contained in:
@@ -74,17 +74,6 @@ if host_system != 'windows'
|
||||
endif
|
||||
endif
|
||||
|
||||
# res_init()
|
||||
if cc.links('''#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/nameser.h>
|
||||
#include <resolv.h>
|
||||
int main (int argc, char ** argv) {
|
||||
return res_init();
|
||||
}''', args : network_args, name : 'res_init()')
|
||||
glib_conf.set('HAVE_RES_INIT', 1)
|
||||
endif
|
||||
|
||||
# res_nclose()
|
||||
if cc.links('''#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
|
Reference in New Issue
Block a user