Fix compilation of the getaddrinfo_a based DNS resolver.
This commit is contained in:
parent
882402033c
commit
4ae402223c
|
@ -158,6 +158,7 @@ final class EventDriverDNS_GAIA(Events : EventDriverEvents, Signals : EventDrive
|
||||||
DNSLookupCallback callback;
|
DNSLookupCallback callback;
|
||||||
}
|
}
|
||||||
ChoppedVector!Lookup m_lookups;
|
ChoppedVector!Lookup m_lookups;
|
||||||
|
Events m_events;
|
||||||
Signals m_signals;
|
Signals m_signals;
|
||||||
int m_dnsSignal;
|
int m_dnsSignal;
|
||||||
SignalListenID m_sighandle;
|
SignalListenID m_sighandle;
|
||||||
|
@ -167,6 +168,7 @@ final class EventDriverDNS_GAIA(Events : EventDriverEvents, Signals : EventDrive
|
||||||
|
|
||||||
this(Events events, Signals signals)
|
this(Events events, Signals signals)
|
||||||
{
|
{
|
||||||
|
m_events = events;
|
||||||
m_signals = signals;
|
m_signals = signals;
|
||||||
m_dnsSignal = () @trusted { return SIGRTMIN; } ();
|
m_dnsSignal = () @trusted { return SIGRTMIN; } ();
|
||||||
m_sighandle = signals.listenInternal(m_dnsSignal, &onDNSSignal);
|
m_sighandle = signals.listenInternal(m_dnsSignal, &onDNSSignal);
|
||||||
|
@ -214,6 +216,8 @@ final class EventDriverDNS_GAIA(Events : EventDriverEvents, Signals : EventDrive
|
||||||
{
|
{
|
||||||
assert(status == SignalStatus.ok);
|
assert(status == SignalStatus.ok);
|
||||||
foreach (i, ref l; m_lookups) {
|
foreach (i, ref l; m_lookups) {
|
||||||
|
scope (failure) assert(false);
|
||||||
|
|
||||||
if (!l.callback) continue;
|
if (!l.callback) continue;
|
||||||
auto err = gai_error(&l.ctx);
|
auto err = gai_error(&l.ctx);
|
||||||
if (err == EAI_INPROGRESS) continue;
|
if (err == EAI_INPROGRESS) continue;
|
||||||
|
@ -243,6 +247,8 @@ final class EventDriverDNS_GAIA(Events : EventDriverEvents, Signals : EventDrive
|
||||||
version (linux) extern(C) {
|
version (linux) extern(C) {
|
||||||
import core.sys.posix.signal : sigevent;
|
import core.sys.posix.signal : sigevent;
|
||||||
|
|
||||||
|
nothrow @nogc:
|
||||||
|
|
||||||
struct gaicb {
|
struct gaicb {
|
||||||
const(char)* ar_name;
|
const(char)* ar_name;
|
||||||
const(char)* ar_service;
|
const(char)* ar_service;
|
||||||
|
|
Loading…
Reference in a new issue