Blame m4/passfd.m4

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