mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
Declare gethostname for XPG4 (bug 20054).
unistd.h declares gethostname for __USE_UNIX98 || __USE_XOPEN2K. But it's also in XPG4 (XNS volume - C438 - not the main definitions of system interfaces and headers in C435). This patch corrects the condition. Tested for x86_64 and x86 (testsuite, and that installed stripped shared libraries are unchanged by the patch). [BZ #20054] * posix/unistd.h (gethostname): Declare if [__USE_XOPEN_EXTENDED], not [__USE_UNIX98]. * conform/data/unistd.h-data (gethostname): Do not expect for [XPG3].
This commit is contained in:
@@ -490,7 +490,7 @@ function int getgroups (int, gid_t[])
|
||||
#if !defined POSIX && !defined POSIX2008
|
||||
function long gethostid (void)
|
||||
#endif
|
||||
#if !defined POSIX
|
||||
#if !defined POSIX && !defined XPG3
|
||||
function int gethostname (char*, size_t)
|
||||
#endif
|
||||
function {char*} getlogin (void)
|
||||
|
Reference in New Issue
Block a user