From 34e15d75cb7f2add6386fe6c62ab4a063f63c0f6 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 26 Aug 2023 20:39:04 +0200 Subject: [PATCH] sys_utsname: Make double-inclusion guard more robust. * lib/sys_utsname.in.h: Test the guard symbol a second time. --- ChangeLog | 5 +++++ lib/sys_utsname.in.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index aa401f7efe..12a8087ed4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2023-08-26 Bruno Haible + + sys_utsname: Make double-inclusion guard more robust. + * lib/sys_utsname.in.h: Test the guard symbol a second time. + 2023-08-26 Bruno Haible sys_times: Make double-inclusion guard more robust. diff --git a/lib/sys_utsname.in.h b/lib/sys_utsname.in.h index 40f715adbd..cb46d8faee 100644 --- a/lib/sys_utsname.in.h +++ b/lib/sys_utsname.in.h @@ -21,6 +21,7 @@ #endif @PRAGMA_COLUMNS@ +/* The include_next requires a split double-inclusion guard. */ #if @HAVE_SYS_UTSNAME_H@ /* Minix 3.1.8 has a bug: must be included before . @@ -33,6 +34,7 @@ #endif +#ifndef _@GUARD_PREFIX@_SYS_UTSNAME_H #define _@GUARD_PREFIX@_SYS_UTSNAME_H /* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ @@ -111,3 +113,4 @@ _GL_WARN_ON_USE (uname, "uname is unportable - " #endif /* _@GUARD_PREFIX@_SYS_UTSNAME_H */ +#endif /* _@GUARD_PREFIX@_SYS_UTSNAME_H */ -- 2.39.5