From: Bruno Haible Date: Fri, 2 Sep 2022 17:48:09 +0000 (+0200) Subject: getdomainname: Fix compilation error in C++ mode on Solaris 11. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=bad620a9c5fbb0f206bf8038bd91f669fc5e3b62;p=gnulib.git getdomainname: Fix compilation error in C++ mode on Solaris 11. * lib/unistd.in.h (getdomainname): Enable the C++ alias warning only on glibc systems. --- diff --git a/ChangeLog b/ChangeLog index f07e939717..9505ba3917 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