bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34239: build failure on Android, due to S_MAGIC_* symbols


From: Pádraig Brady
Subject: bug#34239: build failure on Android, due to S_MAGIC_* symbols
Date: Tue, 29 Jan 2019 21:00:35 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

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.

thanks!
Pádraig

Attachment: tail-android.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]