about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--conform/data/unistd.h-data2
-rw-r--r--posix/unistd.h2
3 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index b85a2938ea..fe723a609b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2016-05-12  Joseph Myers  <joseph@codesourcery.com>
 
+	[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].
+
 	* conform/data/fcntl.h-data [!POSIX] (S_IFMT): Do not expect.
 	[!POSIX] (S_IFBLK): Likewise.
 	[!POSIX] (S_IFCHR): Likewise.
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)
diff --git a/posix/unistd.h b/posix/unistd.h
index 7486ecf4a9..98ffcea649 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -875,7 +875,7 @@ extern int setlogin (const char *__name) __THROW __nonnull ((1));
 #endif
 
 
-#if defined __USE_UNIX98 || defined __USE_XOPEN2K
+#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
 /* Put the name of the current host in no more than LEN bytes of NAME.
    The result is null-terminated if LEN is large enough for the full
    name and the terminator.  */