]> Savannah Git Hosting - gnulib.git/commitdiff
readutmp: Port to Android NDK r26.
authorBruno Haible <bruno@clisp.org>
Sun, 21 Jan 2024 16:50:52 +0000 (17:50 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 31 Jan 2024 17:15:27 +0000 (18:15 +0100)
Reported by Po Lu <luangruo@yahoo.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-01/msg00063.html>.

* lib/readutmp.h: (UTMP_NAME_FUNCTION): Define as a no-op for Android
with HAVE_UTMPX_H.

ChangeLog
lib/readutmp.h

index de1fcc40dac7af6c9795121c3b62724c19081c23..839ef67ab52e82463561d6ad7ec6a68c0ace56e9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-01-21  Bruno Haible  <bruno@clisp.org>
+
+       readutmp: Port to Android NDK r26.
+       Reported by Po Lu <luangruo@yahoo.com> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2024-01/msg00063.html>.
+       * lib/readutmp.h: (UTMP_NAME_FUNCTION): Define as a no-op for Android
+       with HAVE_UTMPX_H.
+
 2024-01-21  Bruno Haible  <bruno@clisp.org>
 
        asyncsafe-spin: Fix link error on various platforms.
index 7d2a6281353f44289fec7011560ab149ec79bf60..8b3f5ce457412652414ea6df7805d72f6c1288c1 100644 (file)
@@ -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
 #   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