1

i'm trying to build libuv for android in android studio cmake and i get the following errors:

error: use of undeclared identifier 'EPOLL_CLOEXEC'

warning: implicit declaration of function 'epoll_pwait' [-Wimplicit-function-declaration]

warning: this function declaration is not a prototype [-Wstrict-prototypes]

how can i fix this? am i supposed to use libuv toolchain to build it?

Community
  • 1
  • 1
  • "error: use of undeclared identifier EPOLL_CLOEXEC'" <-- include the proper header that declares EPOLL_CLOEXEC. – Jesper Juhl Nov 07 '18 at 18:40

1 Answers1

3

The issue is probably that your minSdkVersion is too low. That wasn't supported until Android L. Unfortunately because some other popular projects misused that constant to detect if epoll_create1 was available, the constant is not available until epoll_create1 is. See https://github.com/android-ndk/ndk/issues/394 for more details.

Dan Albert
  • 10,079
  • 2
  • 36
  • 79