OSDN Git Service

Don't define IN_CLOEXEC/IN_NONBLOCK for pre-L.
authorDan Albert <danalbert@google.com>
Mon, 22 May 2017 19:58:18 +0000 (12:58 -0700)
committerDan Albert <danalbert@google.com>
Mon, 22 May 2017 19:58:18 +0000 (12:58 -0700)
commit5a215d7817baf190a8af76674303b0d50ce67c07
tree212b863307cf627ce54a8b89cf9f30d76af7da93
parentcdfface662306d20cfaa4abe046eb85794201d6c
Don't define IN_CLOEXEC/IN_NONBLOCK for pre-L.

Some third-party code uses the existence of IN_CLOEXEC/IN_NONBLOCK to
detect the availability of inotify_init1. This is not correct, since
`syscall(__NR_inotify_init1, IN_CLOEXEC)` is still valid even if the C
library doesn't have that function, but for the time being we don't
want to harm adoption to the unified headers. We'll avoid defining
IN_CLOEXEC and IN_NONBLOCK if we don't have inotify_init1 for the time
being, and maybe revisit this later.

Test: make checkbuild
Bug: https://github.com/android-ndk/ndk/issues/394
Change-Id: Iefdc1662b21045de886c7ad1cbeba6241163d943
libc/include/sys/inotify.h