From 8da7d8f877d1eeb02cd00dd3ce1f13da951e72b0 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 10 May 2016 21:52:08 +0000 Subject: Fix sys/stat.h fchmod namespace (bug 20073). sys/stat.h declares fchmod if __USE_POSIX (i.e. POSIX.1:1990). But it was actually added in 1993 and also in XPG4. This patch changes the conditions to the correct __USE_POSIX199309 || __USE_XOPEN_EXTENDED. Tested for x86_64 and x86 (testsuite, and that installed shared libraries are unchanged by the patch). [BZ #20073] * io/sys/stat.h (fchmod): Declare for [__USE_POSIX199309 || __USE_XOPEN_EXTENDED], not [__USE_POSIX]. * conform/Makefile (test-xfail-XPG3/sys/stat.h/conform): Remove variable. --- io/sys/stat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'io/sys') diff --git a/io/sys/stat.h b/io/sys/stat.h index bf63882..416d564 100644 --- a/io/sys/stat.h +++ b/io/sys/stat.h @@ -292,7 +292,7 @@ extern int lchmod (const char *__file, __mode_t __mode) #endif /* Set file access permissions of the file FD is open on to MODE. */ -#ifdef __USE_POSIX +#if defined __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED extern int fchmod (int __fd, __mode_t __mode) __THROW; #endif -- cgit v1.1