From: Bruno Haible Date: Sun, 21 Jan 2024 16:50:52 +0000 (+0100) Subject: readutmp: Port to Android NDK r26. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=fbfb5460e890070f37fb9d9e6d700691f1638c1b;p=gnulib.git readutmp: Port to Android NDK r26. Reported by Po Lu in . * lib/readutmp.h: (UTMP_NAME_FUNCTION): Define as a no-op for Android with HAVE_UTMPX_H. --- diff --git a/ChangeLog b/ChangeLog index de1fcc40da..839ef67ab5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024-01-21 Bruno Haible + + readutmp: Port to Android NDK r26. + Reported by Po Lu in + . + * lib/readutmp.h: (UTMP_NAME_FUNCTION): Define as a no-op for Android + with HAVE_UTMPX_H. + 2024-01-21 Bruno Haible asyncsafe-spin: Fix link error on various platforms. diff --git a/lib/readutmp.h b/lib/readutmp.h index 7d2a628135..8b3f5ce457 100644 --- a/lib/readutmp.h +++ b/lib/readutmp.h @@ -1,6 +1,6 @@ /* Declarations for GNU's read utmp module. - Copyright (C) 1992-2007, 2009-2023 Free Software Foundation, Inc. + Copyright (C) 1992-2007, 2009-2024 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -57,6 +57,10 @@ # define UTMP_NAME_FUNCTION utmpxname # elif defined UTXDB_ACTIVE # define UTMP_NAME_FUNCTION(x) setutxdb (UTXDB_ACTIVE, x) +# elif defined __ANDROID__ /* Android */ +/* As of Android NDK r26, the getutxent, setutxent functions are no-ops. + Therefore we can ignore the file name. */ +# define UTMP_NAME_FUNCTION(x) ((void) (x)) # endif # if HAVE_STRUCT_UTMPX_UT_EXIT_E_TERMINATION