* 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: 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.
<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@
-# 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,
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <sys/types.h>
+ #include <stddef.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
struct cmsghdr *cmsg;
int myfds[1] = {0};
char buf[CMSG_SPACE (sizeof (myfds))];
- int *fdptr;
msg.msg_control = buf;
msg.msg_controllen = sizeof buf;