[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug#64937: "who" reports funny dates
From: |
Bruno Haible |
Subject: |
Re: bug#64937: "who" reports funny dates |
Date: |
Tue, 08 Aug 2023 17:28:08 +0200 |
I wrote on 2023-08-02:
> I wrote:
> > The proposed patch is attached.
>
> Oops, I missed a sizeof of the ut_id field. A corrected patch is attached.
Oops, this causes a compilation error on OpenBSD:
In file included from ../../gllib/readutmp.c:22:
../../gllib/readutmp.h:216:50: error: no member named 'ut_id' in 'struct utmp'
enum { UT_ID_SIZE = sizeof (((STRUCT_UTMP *) 0)->ut_id) };
~~~~~~~~~~~~~~~~~~~ ^
This patch fixes it.
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.
diff --git a/lib/readutmp.h b/lib/readutmp.h
index 01964d2622..9f53246597 100644
--- a/lib/readutmp.h
+++ b/lib/readutmp.h
@@ -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
- Re: boot time on Linux, (continued)
- Re: boot time on Linux, Bruno Haible, 2023/08/10
- Re: boot time on Linux, Bruno Haible, 2023/08/09
- Message not available
- Re: bug#64937: "who" reports funny dates, Thorsten Kukuk, 2023/08/10
- Re: bug#64937: "who" reports funny dates, Bruno Haible, 2023/08/10
- Message not available
- Re: bug#64937: "who" reports funny dates, Thorsten Kukuk, 2023/08/10
- Re: bug#64937: "who" reports funny dates, Paul Eggert, 2023/08/08
- Re: bug#64937: "who" reports funny dates,
Bruno Haible <=
Re: bug#64937: "who" reports funny dates, Thorsten Kukuk, 2023/08/02
Re: bug#64937: session leaders pids, Bruno Haible, 2023/08/02