Towards INN 2.6.4 release

Julien ÉLIE julien at trigofacile.com
Tue Oct 13 21:40:37 UTC 2020


Hi Bo,

> Examples from INN include the mmap tests calling umask(2) without including
> <sys/stat.h> and close(2) without including <unistd.h>.  The consequent
> compilation errors (spuriously) undefine HAVE_MMAP.
> 
> A patch for these is attached.

Thanks, included.


Russ, this one is for rra-c-util:

--- inn-2.6.3/m4/socket.m4	2019-02-07 16:02:22.000000000 +0100
+++ inn-hacked/m4/socket.m4	2020-10-12 23:25:00.000000000 +0200
@@ -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>






Note that I've added "#if HAVE_UNISTD_H" checks to your proposal.

Index: lib/getpagesize.c
===================================================================
--- lib/getpagesize.c	(révision 10387)
+++ lib/getpagesize.c	(copie de travail)
@@ -8,7 +8,9 @@
  */

  #include "config.h"
-#include <unistd.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif

  int
  getpagesize(void)
Index: m4/mmap.m4
===================================================================
--- m4/mmap.m4	(révision 10387)
+++ m4/mmap.m4	(copie de travail)
@@ -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()
Index: storage/cnfs/cnfs-private.h
===================================================================
--- storage/cnfs/cnfs-private.h	(révision 10387)
+++ storage/cnfs/cnfs-private.h	(copie de travail)
@@ -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"


-- 
Julien ÉLIE

« – I see the world didn't end yesterday.
   – Are you sure? » (Alan Moore, _Watchmen_)


More information about the inn-workers mailing list