Mercurial > hg > octave-kai > gnulib-hg
changeset 14428:37be22410279
passfd: Work around bug with CMSG_FIRSTHDR on FreeBSD 6.4.
* lib/sys_socket.in.h: Include <stddef.h>.
* m4/afunix.m4 (gl_SOCKET_AFUNIX): Include <stddef.h> before using
CMSG_FIRSTHDR. Remove unused variable.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sun, 13 Mar 2011 23:54:58 +0100 |
parents | 4c39cf933978 |
children | 1d9adb689c1d |
files | ChangeLog lib/sys_socket.in.h m4/afunix.m4 |
diffstat | 3 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-03-13 Bruno Haible <bruno@clisp.org> + + passfd: Work around bug with CMSG_FIRSTHDR on FreeBSD 6.4. + * lib/sys_socket.in.h: Include <stddef.h>. + * m4/afunix.m4 (gl_SOCKET_AFUNIX): Include <stddef.h> before using + CMSG_FIRSTHDR. Remove unused variable. + 2011-03-13 Bruno Haible <bruno@clisp.org> passfd: Fix compilation error on OpenBSD.
--- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -50,6 +50,10 @@ <sys/types.h>. */ # include <sys/types.h> +/* On FreeBSD 6.4, <sys/socket.h> defines some macros that assume that NULL + is defined. */ +# include <stddef.h> + /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@
--- 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_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include <sys/types.h> + #include <stddef.h> #ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> #endif @@ -57,7 +58,6 @@ struct cmsghdr *cmsg; int myfds[1] = {0}; char buf[CMSG_SPACE (sizeof (myfds))]; - int *fdptr; msg.msg_control = buf; msg.msg_controllen = sizeof buf;