changeset 17886:e1d0099b34b0

symlinkat: include all required header files Following on from commit 032bd151, include header files required on OS X 10.10 (Yosemite) at least. * lib/symlinkat.c (HAVE_SYMLINK_AT): Add <sys/stat.h> for fstatat(), and string.h for strlen(). Reported at https://savannah.gnu.org/bugs/index.php?44151 and by Jack Howarth.
author Andreas Gruenbacher <agruen@gnu.org>
date Sun, 01 Feb 2015 21:40:11 +0100
parents 227442eef330
children 0d515569e6aa
files ChangeLog lib/symlinkat.c
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2015-02-02  Andreas Gruenbacher  <agruen@gnu.org>
+
+	symlinkat: include all required header files
+	* lib/symlinkat.c (HAVE_SYMLINK_AT): Add <sys/stat.h> for fstatat(),
+	and string.h for strlen(), required at least on OS X 10.10 (Yosemite).
+	Reported at https://savannah.gnu.org/bugs/index.php?44151
+	and by Jack Howarth.
+
 2015-01-29  Pádraig Brady  <P@draigBrady.com>
 
 	localename: support Solaris 12 and illumos
--- a/lib/symlinkat.c
+++ b/lib/symlinkat.c
@@ -24,6 +24,9 @@
 #if HAVE_SYMLINKAT
 # undef symlinkat
 
+#include <sys/stat.h>
+#include <string.h>
+
 /* Create a symlink, but reject trailing slash.  */
 int
 rpl_symlinkat (char const *contents, int fd, char const *name)