Fix Linux compilation.

This commit is contained in:
Sönke Ludwig 2017-01-25 12:33:00 +01:00
parent d1829669ec
commit b52747247b
No known key found for this signature in database
GPG key ID: D95E8DB493EE314C
4 changed files with 9 additions and 1 deletions

View file

@ -3,6 +3,7 @@ module eventcore.drivers.posix.dns;
import eventcore.driver;
import eventcore.drivers.posix.driver;
import eventcore.internal.utils : ChoppedVector;
import std.socket : Address, AddressFamily, InternetAddress, Internet6Address, UnknownAddress;
version (Posix) {

View file

@ -8,7 +8,8 @@ import eventcore.internal.consumablequeue : ConsumableQueue;
import std.socket : InternetAddress;
version (linux) {
extern (C) int eventfd(uint initval, int flags);
nothrow @nogc extern (C) int eventfd(uint initval, int flags);
import core.sys.posix.unistd : close, read, write;
enum EFD_NONBLOCK = 0x800;
}

View file

@ -4,10 +4,14 @@ module eventcore.drivers.posix.signals;
import eventcore.driver;
import eventcore.drivers.posix.driver;
import std.algorithm.comparison : among;
final class SignalFDEventDriverSignals(Loop : PosixEventLoop) : EventDriverSignals {
@safe: /*@nogc:*/ nothrow:
import core.stdc.errno : errno, EAGAIN, EINPROGRESS;
import core.sys.posix.signal;
import core.sys.posix.unistd : close, read, write;
import core.sys.linux.sys.signalfd;
private Loop m_loop;

View file

@ -7,7 +7,9 @@ import eventcore.drivers.posix.driver;
final class InotifyEventDriverWatchers(Loop : PosixEventLoop) : EventDriverWatchers
{
import core.stdc.errno : errno, EAGAIN, EINPROGRESS;
import core.sys.posix.fcntl, core.sys.posix.unistd, core.sys.linux.sys.inotify;
import std.algorithm.comparison : among;
import std.file;
private {