[PATCH] Fixed Android support

enh enh at google.com
Thu Jun 1 07:18:13 CEST 2017


On Wed, May 31, 2017 at 8:15 PM, Marc Lehmann <schmorp at schmorp.de> wrote:
> On Tue, May 30, 2017 at 05:28:07PM -0700, enh <enh at google.com> wrote:
>> The attached patch fixes Android NDK bug
>> https://github.com/android-ndk/ndk/issues/396 --- basically the
>> presence of EPOLL_CLOEXEC doesn't necessarily imply the presence of
>> epoll_create1 on Android. This is because (as of NDK r15) we're using
>
> If android uses header files that don't match it's libc *on purpose* then
> android is way beyond broken.

no, these are the Android libc header files.

>> Gingerbread, you'll have all the enums and macros and structs from
>> Marshmallow and O. so you actually need a proper configure test for
>> epoll_create1.
>
> configure is optional for libev, so a "proper" test wouldn't work.

i'm not sure what you're saying here: you already use configure and
have correctly used HAVE_ tests for other functions.

> This is clearly a bug in the android headers, and since it apparently only
> affects old versions, I don't think it makes sense to make things worse
> for users of higher quality platforms that have correct header files.

no, it's the opposite way round. older versions of Android didn't have
epoll_create1. newer versions do. if you want to keep building on NDK
r15 and later, you'll need to check for the function, not the
constant. (the constants come from the upstream kernel uapi header
files, and a given Android release doesn't mandate any corresponding
kernel version, so there's no way to version that.)

> I would suggest opening a bug against android so these obvious bugs get
> fixed instead of trying to push patches to the rest of the world to work
> around it.

i manage the Android libc/NDK team :-)

this change is a result the NDK catching up with the platform headers
after being years behind.

> Unrelated, the __ANDROID__ change will be in the next release.
>
> Greetings,
>
> --
>                 The choice of a       Deliantra, the free code+content MORPG
>       -----==-     _GNU_              http://www.deliantra.net
>       ----==-- _       generation
>       ---==---(_)__  __ ____  __      Marc Lehmann
>       --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
>       -=====/_/_//_/\_,_/ /_/\_\



More information about the libev mailing list