mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
dirmngr: Fix setup of libdns for W32.
* configure.ac (DNSLIB) {W32]: Add -liphlpapi. * dirmngr/dns-stuff.c [W32]: Include iphlpapi.h and define WIN32_LEAN_AND_MEAN. (libdns_init) [W32]: Use GetNetworkParams to get the nameserver. * dirmngr/t-dns-stuff.c (init_sockets): New. (main): Call it. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
c3c60843ea
commit
e77b924fec
3 changed files with 67 additions and 2 deletions
|
@ -33,6 +33,16 @@ static int verbose;
|
|||
static int debug;
|
||||
|
||||
|
||||
static void
|
||||
init_sockets (void)
|
||||
{
|
||||
#ifdef HAVE_W32_SYSTEM
|
||||
WSADATA wsadat;
|
||||
|
||||
WSAStartup (0x202, &wsadat);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
|
@ -147,6 +157,8 @@ main (int argc, char **argv)
|
|||
exit (1);
|
||||
}
|
||||
|
||||
init_sockets ();
|
||||
|
||||
if (opt_tor)
|
||||
{
|
||||
err = enable_dns_tormode (opt_new_circuit);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue