From 6286c7980dade6e5d2fe19cc138d9ff9ae221efe Mon Sep 17 00:00:00 2001 From: Radu Racariu Date: Tue, 12 Feb 2019 19:47:37 +0200 Subject: [PATCH] [PosixEventDriverEvents] Use Linux definitions from druntime This doesn't duplicate the definitions form `core.sys.linux.sys.eventfd` and will pickup any platform specifics for better portability. Fixes https://github.com/vibe-d/eventcore/issues/102 --- source/eventcore/drivers/posix/events.d | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/eventcore/drivers/posix/events.d b/source/eventcore/drivers/posix/events.d index ba51c7b..d93c352 100644 --- a/source/eventcore/drivers/posix/events.d +++ b/source/eventcore/drivers/posix/events.d @@ -8,9 +8,7 @@ import eventcore.internal.utils : nogc_assert, mallocT, freeT; version (linux) { - nothrow @nogc extern (C) int eventfd(uint initval, int flags); - enum EFD_NONBLOCK = 0x800; - enum EFD_CLOEXEC = 0x80000; + import core.sys.linux.sys.eventfd : eventfd, EFD_NONBLOCK, EFD_CLOEXEC; } version (Posix) { import core.sys.posix.unistd : close, read, write;