On Tue, Jan 29, 2019 at 9:01 PM Pádraig Brady <p...@draigbrady.com> wrote: > On 28/01/19 19:19, Bruno Haible wrote: > > Hi, > > > > Compiling coreutils on Android produces this error: > > > > CC src/tail.o > > In file included from ../src/tail.c:63: > > ../src/fs-is-local.h: In function 'is_local_fs_type': > > ../src/fs-is-local.h:9: error: 'S_MAGIC_AAFS' undeclared (first use in this > > function) > > ... > > make[2]: *** [src/tail.o] Error 1 > > > > The Android libc, Bionic, does not define any of these S_MAGIC_* symbols or > > macros, even in the newest version [1]. > > > > Can some #ifdef be used to avoid this build failure? > > 'defined __ANDROID__' tests for Android. > > 'defined __linux__' tests for Linux excluding Android. > > > > Bruno > > > > [1] https://android.googlesource.com/platform/bionic/ > > Interesting. So inotify is supported on that android system. > Our ifdefs were wrong anyway as we check for remoteness even if one disables > inotify. > I.E. our build would have failed on standard linux if one explicitly disabled > inotify. > I've fixed that up and added support for the android specific "sdcardfs" > which I found in: > https://android.googlesource.com/kernel/common/+/android-mainline-tracking/include/uapi/linux/magic.h > > Proposed patch attached.
Looks all good. Thanks!