INN commit: branches/2.6 (4 files)

INN Commit rra at isc.org
Thu Nov 12 20:22:52 UTC 2020


    Date: Thursday, November 12, 2020 @ 12:22:51
  Author: iulius
Revision: 10397

Add missing header files to silent gcc warning

Fix build on a few systems like MacOS (warnings may make the system
consider the configure test failed).

Thanks to Bo Lindbergh for the bug report.

Modified:
  branches/2.6/lib/getpagesize.c
  branches/2.6/m4/mmap.m4
  branches/2.6/m4/socket.m4
  branches/2.6/storage/cnfs/cnfs-private.h

-----------------------------+
 lib/getpagesize.c           |    4 +++-
 m4/mmap.m4                  |   14 +++++++++++---
 m4/socket.m4                |    1 +
 storage/cnfs/cnfs-private.h |    4 +++-
 4 files changed, 18 insertions(+), 5 deletions(-)

Modified: lib/getpagesize.c
===================================================================
--- lib/getpagesize.c	2020-11-12 20:19:41 UTC (rev 10396)
+++ lib/getpagesize.c	2020-11-12 20:22:51 UTC (rev 10397)
@@ -8,7 +8,9 @@
 */
 
 #include "config.h"
-#include <unistd.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
 
 int
 getpagesize(void)

Modified: m4/mmap.m4
===================================================================
--- m4/mmap.m4	2020-11-12 20:19:41 UTC (rev 10396)
+++ m4/mmap.m4	2020-11-12 20:22:51 UTC (rev 10397)
@@ -26,8 +26,12 @@
 define([_INN_FUNC_MMAP_SOURCE],
 [AC_LANG_SOURCE([[
 #include <fcntl.h>
+#include <stdlib.h>
 #include <sys/mman.h>
-#include <stdlib.h>
+#include <sys/stat.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
 
 int
 main()
@@ -87,10 +91,14 @@
 dnl Source used by INN_FUNC_MMAP_NEEDS_MSYNC.
 define([_INN_FUNC_MMAP_NEEDS_MSYNC_SOURCE],
 [AC_LANG_SOURCE([[
-#include <sys/types.h>
 #include <fcntl.h>
+#include <stdlib.h>
 #include <sys/mman.h>
-#include <stdlib.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
 
 int
 main()

Modified: m4/socket.m4
===================================================================
--- m4/socket.m4	2020-11-12 20:19:41 UTC (rev 10396)
+++ m4/socket.m4	2020-11-12 20:22:51 UTC (rev 10397)
@@ -39,6 +39,7 @@
 AC_DEFUN([_INN_FUNC_GETADDRINFO_ADDRCONFIG_SOURCE], [[
 #include <netdb.h>
 #include <stdio.h>
+#include <string.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 

Modified: storage/cnfs/cnfs-private.h
===================================================================
--- storage/cnfs/cnfs-private.h	2020-11-12 20:19:41 UTC (rev 10396)
+++ storage/cnfs/cnfs-private.h	2020-11-12 20:22:51 UTC (rev 10397)
@@ -7,7 +7,9 @@
 #define CNFS_PRIVATE_H 1
 
 #include <sys/types.h>
-#include <unistd.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
 
 #define _PATH_CYCBUFFCONFIG	"cycbuff.conf"
 



More information about the inn-committers mailing list