2 dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
9 AC_REQUIRE([gl_HEADER_SYS_SOCKET])
10 AC_CHECK_FUNCS_ONCE([recvmsg sendmsg])
12 dnl Persuade AIX 5.2 <sys/socket.h> to declare CMSG_SPACE, CMSG_LEN.
13 dnl CMSG_FIRSTHDR is POSIX 2008, but CMSG_SPACE is only in RFC 3542.
14 AC_DEFINE([_LINUX_SOURCE_COMPAT], [1],
15 [Define in order to get some macros on AIX systems.])
17 dnl Passfd prefers the POSIX use of msg.msg_control if the CMSG_* macros
18 dnl are present, but can fall back to BSD 4.3 style of msg.msg_accrights.
19 AC_CHECK_MEMBERS([struct msghdr.msg_accrights], [], [], [[
20 #include <sys/types.h>
21 #include <sys/socket.h>