INN commit: trunk (5 files)

INN Commit rra at isc.org
Fri Sep 10 17:59:12 UTC 2010


    Date: Friday, September 10, 2010 @ 10:59:11
  Author: iulius
Revision: 9104

INN thinks that OpenBSD (4.6) doesn't support Unix-domain sockets.
The problem is that <sys/socket.h> doesn't include cleanly unless you
include <sys/types.h>, and the AF_UNIX test in m4/socket.m4 doesn't include
<sys/types.h>.

It is also added to the test program for AI_ADDRCONFIG, even though (a)
including stdio.h happens to pull in the necessary headers and (b) OpenBSD
doesn't have AI_ADDRCONFIG anyway.

Note:  m4/sendfd.m4 can be left without the patch.  This will always fail
on OpenBSD anyway, so it shouldn't matter.  This will only successfully
compile and run on a STREAMS-based system, so only SysV.
It is the same for include/portable/getnameinfo.h and
include/portable/getaddrinfo.h:  none of those currently cause problems
because these headers are only included by files which have already included
sys/types.h, and OpenBSD doesn't support STREAMS at all.

Thanks to Wim Lewis for the patch.

Modified:
  trunk/doc/pod/news.pod
  trunk/include/portable/getaddrinfo.h
  trunk/include/portable/getnameinfo.h
  trunk/m4/sendfd.m4
  trunk/m4/socket.m4

--------------------------------+
 doc/pod/news.pod               |    5 +++++
 include/portable/getaddrinfo.h |    2 +-
 include/portable/getnameinfo.h |    2 +-
 m4/sendfd.m4                   |    1 +
 m4/socket.m4                   |    2 ++
 5 files changed, 10 insertions(+), 2 deletions(-)

Modified: doc/pod/news.pod
===================================================================
--- doc/pod/news.pod	2010-08-11 15:20:09 UTC (rev 9103)
+++ doc/pod/news.pod	2010-09-10 17:59:11 UTC (rev 9104)
@@ -153,6 +153,11 @@
 B<innd> was previously accepting, and also generating Xref: header field
 lines, up to 1022 bytes.
 
+=item *
+
+Fixed an issue at configure time that made INN wrongly assume that OpenBSD
+(4.6) didn't support Unix-domain sockets.  Thanks to Wim Lewis for the patch.
+
 =back
 
 =head1 Changes in 2.5.2

Modified: include/portable/getaddrinfo.h
===================================================================
--- include/portable/getaddrinfo.h	2010-08-11 15:20:09 UTC (rev 9103)
+++ include/portable/getaddrinfo.h	2010-09-10 17:59:11 UTC (rev 9104)
@@ -22,8 +22,8 @@
 /* Skip this entire file if a system getaddrinfo was detected. */
 #if !HAVE_GETADDRINFO
 
+#include <sys/types.h>
 #include <sys/socket.h>
-#include <sys/types.h>
 
 /* The struct returned by getaddrinfo, from RFC 3493. */
 struct addrinfo {

Modified: include/portable/getnameinfo.h
===================================================================
--- include/portable/getnameinfo.h	2010-08-11 15:20:09 UTC (rev 9103)
+++ include/portable/getnameinfo.h	2010-09-10 17:59:11 UTC (rev 9104)
@@ -22,8 +22,8 @@
 /* Skip this entire file if a system getaddrinfo was detected. */
 #if !HAVE_GETNAMEINFO
 
+#include <sys/types.h>
 #include <sys/socket.h>
-#include <sys/types.h>
 
 /* Constants for flags from RFC 3493, combined with binary or. */
 #define NI_NOFQDN       0x0001

Modified: m4/sendfd.m4
===================================================================
--- m4/sendfd.m4	2010-08-11 15:20:09 UTC (rev 9103)
+++ m4/sendfd.m4	2010-09-10 17:59:11 UTC (rev 9104)
@@ -14,6 +14,7 @@
 # include <string.h>
 #endif
 #include <stropts.h>
+#include <sys/types.h>
 #include <sys/socket.h>
 #if HAVE_UNISTD_H
 # include <unistd.h>

Modified: m4/socket.m4
===================================================================
--- m4/socket.m4	2010-08-11 15:20:09 UTC (rev 9103)
+++ m4/socket.m4	2010-09-10 17:59:11 UTC (rev 9104)
@@ -24,6 +24,7 @@
 AC_DEFUN([_INN_FUNC_GETADDRINFO_ADDRCONFIG_SOURCE], [[
 #include <netdb.h>
 #include <stdio.h>
+#include <sys/types.h>
 #include <sys/socket.h>
 
 int
@@ -135,6 +136,7 @@
 
 dnl Source used by INN_SYS_UNIX_SOCKETS.
 AC_DEFUN([_INN_SYS_UNIX_SOCKETS], [[
+#include <sys/types.h>
 #include <sys/socket.h>
 #ifndef AF_UNIX
 error:  No Unix domain sockets!




More information about the inn-committers mailing list