Po Lu <[email protected]> writes:
> Bruno Haible <[email protected]> writes:
>
>> Po Lu wrote:
>>> The latest Gnulib getloadavg.c does not compile on Android API 8, with
>>> the NDK r10c:
>>>
>>> CC getloadavg.o
>>> getloadavg.c: In function 'rpl_getloadavg':
>>> getloadavg.c:509:5: error: implicit declaration of function 'sysinfo'
>>> [-Werror=implicit-function-declaration]
>>> if (sysinfo (&info) < 0)
>>> ^
>>>
>>> which function is not available till API level 13.
>>
>> Looking at https://apilevels.com/, especially the column "Cumulative usage",
>> it seems there are no users of Android API level 13 or older any more.
>
> My experience differs--many E-Book readers are shipped with API 8 or 9,
> and the earliest release of Replicant (which is the only release certain
> devices are capable of running).
>
>> I would therefore suggest to build Emacs with Android API level >= 14.
>
> No.
I should advise you now that the breadth of Android systems supported by
Emacs is non-negotiable as a matter of principle for myself, who am sick
and tired of Android apps that observe the Google-endorsed practice of
abandoning perfectly workable systems as soon as an overreaching
corporation pronounces them obsolescent. I suggest that you cooperate
by installing the very trivial patch now in "admin/gnulib-patches/lib",
to wit:
diff --git a/lib/getloadavg.c b/lib/getloadavg.c
index 9da41c16c02..1cb1c01097d 100644
--- a/lib/getloadavg.c
+++ b/lib/getloadavg.c
@@ -499,7 +499,8 @@ getloadavg (double loadavg[], int nelem)
}
# endif
-# if !defined (LDAV_DONE) && (defined __linux__ || defined __ANDROID__)
+# if !defined (LDAV_DONE) && (defined __linux__ || defined __ANDROID__) \
+ && (!defined __ANDROID__ || __ANDROID_API__ >= 13)
/* Linux without glibc, Android, Cygwin
*/
# define LDAV_DONE
# undef LOAD_AVE_TYPE