From fcb371661f4d12c7366361ba8a7d4681b59130c9 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 2 Sep 2022 19:48:09 +0200 Subject: [PATCH] getdomainname: Fix compilation error in C++ mode on Solaris 11. * lib/unistd.in.h (getdomainname): Enable the C++ alias warning only on glibc systems. --- ChangeLog | 6 ++++++ lib/unistd.in.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 948f7c79a6..7972c1f0a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2022-09-02 Bruno Haible + + getdomainname: Fix compilation error in C++ mode on Solaris 11. + * lib/unistd.in.h (getdomainname): Enable the C++ alias warning only on + glibc systems. + 2022-09-02 Bruno Haible terminfo: Don't disturb the termcap module. diff --git a/lib/unistd.in.h b/lib/unistd.in.h index 57df09ecdf..ef3e68fcd2 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -1143,7 +1143,9 @@ _GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len) # endif _GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getdomainname); +# endif #elif defined GNULIB_POSIXCHECK # undef getdomainname # if HAVE_RAW_DECL_GETDOMAINNAME -- 2.39.5