INN commit: trunk (4 files)

INN Commit rra at isc.org
Sun Nov 8 19:45:03 UTC 2020


    Date: Sunday, November 8, 2020 @ 11:45:02
  Author: iulius
Revision: 10390

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:
  trunk/lib/getpagesize.c
  trunk/m4/mmap.m4
  trunk/m4/socket.m4
  trunk/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-10-13 19:10:04 UTC (rev 10389)
+++ lib/getpagesize.c	2020-11-08 19:45:02 UTC (rev 10390)
@@ -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-10-13 19:10:04 UTC (rev 10389)
+++ m4/mmap.m4	2020-11-08 19:45:02 UTC (rev 10390)
@@ -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-10-13 19:10:04 UTC (rev 10389)
+++ m4/socket.m4	2020-11-08 19:45:02 UTC (rev 10390)
@@ -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-10-13 19:10:04 UTC (rev 10389)
+++ storage/cnfs/cnfs-private.h	2020-11-08 19:45:02 UTC (rev 10390)
@@ -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