From: Bruno Haible Date: Fri, 11 Aug 2023 00:39:56 +0000 (+0200) Subject: readutmp: Make the header file includable from C++. X-Git-Tag: v1.0~937 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=52d569921da2478412458f907c3ec1f30f69f72f;p=gnulib.git readutmp: Make the header file includable from C++. * lib/readutmp.h: Add extern "C" block. --- 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__ */