mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35:06 -05:00
nameserv: move fallback DNS_Name2IPAddressAsync() to stubs.c
This commit is contained in:
@@ -34,8 +34,6 @@
|
||||
#include "sched.h"
|
||||
#include "util.h"
|
||||
|
||||
#ifdef FEAT_ASYNCDNS
|
||||
|
||||
#ifdef USE_PTHREAD_ASYNCDNS
|
||||
#include <pthread.h>
|
||||
|
||||
@@ -124,21 +122,3 @@ DNS_Name2IPAddressAsync(const char *name, DNS_NameResolveHandler handler, void *
|
||||
#else
|
||||
#error
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
/* This is a blocking implementation used when nothing else is available */
|
||||
|
||||
void
|
||||
DNS_Name2IPAddressAsync(const char *name, DNS_NameResolveHandler handler, void *anything)
|
||||
{
|
||||
IPAddr addr;
|
||||
DNS_Status status;
|
||||
|
||||
status = DNS_Name2IPAddress(name, &addr);
|
||||
(handler)(status, &addr, anything);
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user