fatal error: sys/eventfd.h: No such file or directory

fatal error: sys/eventfd.h: No such file or directory

我尝试为 Android

构建 nanomsg
~/work/android-ndk-r10e/ndk-build 

我有错误:

In file included from /home/roman/work/Nano/app/jni/src/utils/efd.c:28:0:
/home/roman/work/Nano/app/jni/src/utils/efd_eventfd.inc:27:25: fatal error: sys/eventfd.h: No such file or directory
 #include <sys/eventfd.h>
                         ^
compilation terminated.
make: *** [/home/roman/work/Nano/app/obj/local/armeabi/objs/nano/src/utils/efd.o] Error 1

但我看到 bionic 包含此文件(参见 here)。

我不明白哪里不对! 我用这个 Android.mk: https://gist.github.com/kristianlm/27d12ca7e4b2ef8e89fc

有人可以帮我吗? 谢谢!

我添加了 Application.mk 并且有效:

APP_STL := gnustl_static
APP_CPPFLAGS:= -std=c++11 -frtti -fexceptions
NDK_TOOLCHAIN_VERSION=4.8
APP_PLATFORM := android-10
APP_ABI := armeabi