diff options
author | Joseph Myers <joseph@codesourcery.com> | 2016-05-12 16:50:43 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2016-05-12 16:50:43 +0000 |
commit | 612fe4327577f9afaf6f45b400a737683eef9d0c (patch) | |
tree | f494de06b230dcb0bc035033a69f37c8b643098d /conform | |
parent | ca927ec4c23f47b559e8e2d493caaad9c13092f6 (diff) | |
download | glibc-612fe4327577f9afaf6f45b400a737683eef9d0c.tar glibc-612fe4327577f9afaf6f45b400a737683eef9d0c.tar.gz glibc-612fe4327577f9afaf6f45b400a737683eef9d0c.tar.bz2 glibc-612fe4327577f9afaf6f45b400a737683eef9d0c.zip |
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].
Diffstat (limited to 'conform')
-rw-r--r-- | conform/data/unistd.h-data | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/conform/data/unistd.h-data b/conform/data/unistd.h-data index 9c00d44551..5958ff700c 100644 --- a/conform/data/unistd.h-data +++ b/conform/data/unistd.h-data @@ -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) |