>From 3712d6cd285b2bd42592b2d7bd5bf4645f6d443c Mon Sep 17 00:00:00 2001
From: Bruno Haible
Date: Sun, 30 Jun 2019 15:52:09 +0200
Subject: [PATCH 1/2] Include when needed.
* lib/areadlinkat.c: Include , needed for free() in at-func.c.
* lib/faccessat.c: Likewise.
* lib/fchmodat.c: Likewise.
* lib/fchownat.c: Likewise.
* lib/fstatat.c: Likewise.
* lib/mkfifoat.c: Likewise.
* lib/mknodat.c: Likewise.
* lib/readlinkat.c: Likewise.
* lib/symlinkat.c: Likewise.
* lib/utimensat.c: Likewise.
* lib/mkdirat.c: Likewise. Include also the specification header.
---
ChangeLog | 15 +++++++++++++++
lib/areadlinkat.c | 2 ++
lib/faccessat.c | 3 +++
lib/fchmodat.c | 2 ++
lib/fchownat.c | 2 ++
lib/fstatat.c | 1 +
lib/mkdirat.c | 4 ++++
lib/mkfifoat.c | 3 +++
lib/mknodat.c | 3 +++
lib/readlinkat.c | 5 ++++-
lib/symlinkat.c | 3 +++
lib/utimensat.c | 2 ++
12 files changed, 44 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 2fc31a3..f554b5d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
2019-06-30 Bruno Haible
+ Include when needed.
+ * lib/areadlinkat.c: Include , needed for free() in at-func.c.
+ * lib/faccessat.c: Likewise.
+ * lib/fchmodat.c: Likewise.
+ * lib/fchownat.c: Likewise.
+ * lib/fstatat.c: Likewise.
+ * lib/mkfifoat.c: Likewise.
+ * lib/mknodat.c: Likewise.
+ * lib/readlinkat.c: Likewise.
+ * lib/symlinkat.c: Likewise.
+ * lib/utimensat.c: Likewise.
+ * lib/mkdirat.c: Likewise. Include also the specification header.
+
+2019-06-30 Bruno Haible
+
inet_ntop, inet_pton: Avoid conflict with native Windows functions.
* m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_WS2TCPIP): New macro, extracted
from gl_PREREQ_SYS_H_SOCKET.
diff --git a/lib/areadlinkat.c b/lib/areadlinkat.c
index 6dfbb61..fd9e2f2 100644
--- a/lib/areadlinkat.c
+++ b/lib/areadlinkat.c
@@ -25,6 +25,8 @@
/* Specification. */
#include "areadlink.h"
+#include
+
#include "careadlinkat.h"
#if HAVE_READLINKAT
diff --git a/lib/faccessat.c b/lib/faccessat.c
index 6c63e61..e8e581a 100644
--- a/lib/faccessat.c
+++ b/lib/faccessat.c
@@ -22,9 +22,12 @@
#define _GL_INCLUDING_UNISTD_H
#include
+/* Specification. */
#include
+
#include
#include
+#include
#include
#include
#undef _GL_INCLUDING_UNISTD_H
diff --git a/lib/fchmodat.c b/lib/fchmodat.c
index 088d3c0..ea55f65 100644
--- a/lib/fchmodat.c
+++ b/lib/fchmodat.c
@@ -18,9 +18,11 @@
#include
+/* Specification. */
#include
#include
+#include
#ifndef HAVE_LCHMOD
/* Use a different name, to avoid conflicting with any
diff --git a/lib/fchownat.c b/lib/fchownat.c
index 538d86d..9fb9ce9 100644
--- a/lib/fchownat.c
+++ b/lib/fchownat.c
@@ -23,9 +23,11 @@
#include
+/* Specification. */
#include
#include
+#include
#include
#include "openat.h"
diff --git a/lib/fstatat.c b/lib/fstatat.c
index 019d3c6..db864da 100644
--- a/lib/fstatat.c
+++ b/lib/fstatat.c
@@ -49,6 +49,7 @@ orig_fstatat (int fd, char const *filename, struct stat *buf, int flags)
#include
#include
+#include
#include
#if HAVE_FSTATAT && HAVE_WORKING_FSTATAT_ZERO_FLAG
diff --git a/lib/mkdirat.c b/lib/mkdirat.c
index 21c09cc..fd53d83 100644
--- a/lib/mkdirat.c
+++ b/lib/mkdirat.c
@@ -18,6 +18,10 @@
#include
+/* Specification. */
+#include
+
+#include
#include
/* Solaris 10 has no function like this.
diff --git a/lib/mkfifoat.c b/lib/mkfifoat.c
index 8e44ade..2ed7aeb 100644
--- a/lib/mkfifoat.c
+++ b/lib/mkfifoat.c
@@ -18,8 +18,11 @@
#include
+/* Specification. */
#include
+#include
+
#if !HAVE_MKFIFO
# include
diff --git a/lib/mknodat.c b/lib/mknodat.c
index 0cec0d3..c5ca756 100644
--- a/lib/mknodat.c
+++ b/lib/mknodat.c
@@ -18,8 +18,11 @@
#include
+/* Specification. */
#include
+#include
+
#if !HAVE_MKNOD
# include
diff --git a/lib/readlinkat.c b/lib/readlinkat.c
index c0f3e59..0694116 100644
--- a/lib/readlinkat.c
+++ b/lib/readlinkat.c
@@ -18,8 +18,11 @@
#include
-#include
+/* Specification. */
#include
+
+#include
+#include
#include
#include
diff --git a/lib/symlinkat.c b/lib/symlinkat.c
index 7d58cd9..4f7df8e 100644
--- a/lib/symlinkat.c
+++ b/lib/symlinkat.c
@@ -18,8 +18,11 @@
#include
+/* Specification. */
#include
+
#include
+#include
#if HAVE_SYMLINKAT
# undef symlinkat
diff --git a/lib/utimensat.c b/lib/utimensat.c
index e9ea626..ebd339d 100644
--- a/lib/utimensat.c
+++ b/lib/utimensat.c
@@ -18,10 +18,12 @@
#include
+/* Specification. */
#include
#include
#include
+#include
#include "stat-time.h"
#include "timespec.h"
--
2.7.4