diff options
Diffstat (limited to 'src/system/EPollFD.cxx')
-rw-r--r-- | src/system/EPollFD.cxx | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/system/EPollFD.cxx b/src/system/EPollFD.cxx index 5721c0194..43e74712f 100644 --- a/src/system/EPollFD.cxx +++ b/src/system/EPollFD.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2013 The Music Player Daemon Project + * Copyright (C) 2003-2014 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -22,6 +22,21 @@ #include "EPollFD.hxx" #include "FatalError.hxx" +#ifdef __BIONIC__ + +#include <sys/syscall.h> +#include <fcntl.h> + +#define EPOLL_CLOEXEC O_CLOEXEC + +static inline int +epoll_create1(int flags) +{ + return syscall(__NR_epoll_create1, flags); +} + +#endif + EPollFD::EPollFD() :fd(::epoll_create1(EPOLL_CLOEXEC)) { |