From: Bruno Haible Date: Sun, 13 Mar 2011 22:54:58 +0000 (+0100) Subject: passfd: Work around bug with CMSG_FIRSTHDR on FreeBSD 6.4. X-Git-Tag: v0.1~3095 X-Git-Url: https://erislabs.net/gitweb/?a=commitdiff_plain;h=6acf0ec37a8adfcdd264e494636b263e267a69fb;p=gnulib.git passfd: Work around bug with CMSG_FIRSTHDR on FreeBSD 6.4. * lib/sys_socket.in.h: Include . * m4/afunix.m4 (gl_SOCKET_AFUNIX): Include before using CMSG_FIRSTHDR. Remove unused variable. --- diff --git a/ChangeLog b/ChangeLog index b68fa2978..873a4c369 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2011-03-13 Bruno Haible + passfd: Work around bug with CMSG_FIRSTHDR on FreeBSD 6.4. + * lib/sys_socket.in.h: Include . + * m4/afunix.m4 (gl_SOCKET_AFUNIX): Include before using + CMSG_FIRSTHDR. Remove unused variable. + +2011-03-13 Bruno Haible + passfd: Fix compilation error on OpenBSD. * lib/passfd.c: Include . diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index 55f36ef12..b60789f2a 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -50,6 +50,10 @@ . */ # include +/* On FreeBSD 6.4, defines some macros that assume that NULL + is defined. */ +# include + /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@ diff --git a/m4/afunix.m4 b/m4/afunix.m4 index fdedeba67..d218537cc 100644 --- a/m4/afunix.m4 +++ b/m4/afunix.m4 @@ -1,4 +1,4 @@ -# afunix.m4 serial 3 +# afunix.m4 serial 4 dnl Copyright (C) 2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -43,6 +43,7 @@ AC_DEFUN([gl_SOCKET_AFUNIX], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include + #include #ifdef HAVE_SYS_SOCKET_H #include #endif @@ -57,7 +58,6 @@ AC_DEFUN([gl_SOCKET_AFUNIX], struct cmsghdr *cmsg; int myfds[1] = {0}; char buf[CMSG_SPACE (sizeof (myfds))]; - int *fdptr; msg.msg_control = buf; msg.msg_controllen = sizeof buf;