]> git.ipfire.org Git - thirdparty/glibc.git/commit
Declare gethostname for XPG4 (bug 20054).
authorJoseph Myers <joseph@codesourcery.com>
Thu, 12 May 2016 16:50:43 +0000 (16:50 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Thu, 12 May 2016 16:50:43 +0000 (16:50 +0000)
commit612fe4327577f9afaf6f45b400a737683eef9d0c
treef494de06b230dcb0bc035033a69f37c8b643098d
parentca927ec4c23f47b559e8e2d493caaad9c13092f6
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].
ChangeLog
conform/data/unistd.h-data
posix/unistd.h