From 52d569921da2478412458f907c3ec1f30f69f72f Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 11 Aug 2023 02:39:56 +0200 Subject: [PATCH] readutmp: Make the header file includable from C++. * lib/readutmp.h: Add extern "C" block. --- ChangeLog | 5 +++++ lib/readutmp.h | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/ChangeLog b/ChangeLog index 979761ad16..0a35614fd4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2023-08-10 Bruno Haible + + readutmp: Make the header file includable from C++. + * lib/readutmp.h: Add extern "C" block. + 2023-08-10 Bruno Haible readutmp: Tweak the Android specific addition. diff --git a/lib/readutmp.h b/lib/readutmp.h index b74d37cde3..8db549a393 100644 --- a/lib/readutmp.h +++ b/lib/readutmp.h @@ -56,6 +56,11 @@ #endif +#ifdef __cplusplus +extern "C" { +#endif + + /* Type of entries returned by read_utmp on all platforms. */ struct gl_utmp { @@ -279,4 +284,9 @@ char *extract_trimmed_name (const STRUCT_UTMP *ut) int read_utmp (char const *file, idx_t *n_entries, STRUCT_UTMP **utmp_buf, int options); + +#ifdef __cplusplus +} +#endif + #endif /* __READUTMP_H__ */ -- 2.39.5