]> Savannah Git Hosting - gnulib.git/commitdiff
readutmp: Fix compilation error on OpenBSD (regr. 2023-08-02).
authorBruno Haible <bruno@clisp.org>
Tue, 8 Aug 2023 15:23:24 +0000 (17:23 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 8 Aug 2023 15:23:53 +0000 (17:23 +0200)
* lib/readutmp.h (UT_ID_SIZE): Define to a dummy if there is no ut_id
field.

ChangeLog
lib/readutmp.h

index 25d90019dac767a79ea1201ea2a041391eeb7961..21886433f9f7a85e15e63cbd70377907d8089ee0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-08-08  Bruno Haible  <bruno@clisp.org>
+
+       readutmp: Fix compilation error on OpenBSD (regr. 2023-08-02).
+       * lib/readutmp.h (UT_ID_SIZE): Define to a dummy if there is no ut_id
+       field.
+
 2023-08-07  Paul Eggert  <eggert@cs.ucla.edu>
 
        quotearg: fix obsolete comment
index 01964d2622f893a4c2d4564ddb5bf5a56dcd859b..9f532465970777af8ff8e54366380170756b4e62 100644 (file)
@@ -213,7 +213,11 @@ enum { UT_USER_SIZE = sizeof UT_USER ((STRUCT_UTMP *) 0) };
 #if HAVE_GL_UTMP
 enum { UT_ID_SIZE = -1 };
 #else
+# if (HAVE_UTMPX_H ? HAVE_STRUCT_UTMPX_UT_ID : HAVE_STRUCT_UTMP_UT_ID)
 enum { UT_ID_SIZE = sizeof (((STRUCT_UTMP *) 0)->ut_id) };
+# else
+enum { UT_ID_SIZE = 1 };
+# endif
 # define UT_ID_SIZE UT_ID_SIZE
 #endif