Pretty trivial:

2023-08-10  Bruno Haible  <br...@clisp.org>

        readutmp: Make the header file includable from C++.
        * lib/readutmp.h: Add extern "C" block.

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__ */




Reply via email to