From Kris Katterjohn: explicitly check for socklen_t, don't just assume
glibc is the only Linux libc that defines socklen_t.
This commit is contained in:
parent
e598e9e145
commit
ba695ca78c
|
@ -152,6 +152,9 @@
|
|||
/* define if your compiler has __attribute__ */
|
||||
#undef HAVE___ATTRIBUTE__
|
||||
|
||||
/* Is the socklen_t data type defined? */
|
||||
#undef HAVE_SOCKLEN_T
|
||||
|
||||
/* IPv6 */
|
||||
#undef INET6
|
||||
|
||||
|
|
17
configure.in
17
configure.in
|
@ -1,4 +1,4 @@
|
|||
dnl @(#) $Header: /tcpdump/master/libpcap/configure.in,v 1.138.2.8 2008-03-13 18:16:37 guy Exp $ (LBL)
|
||||
dnl @(#) $Header: /tcpdump/master/libpcap/configure.in,v 1.138.2.9 2008-03-14 09:13:33 guy Exp $ (LBL)
|
||||
dnl
|
||||
dnl Copyright (c) 1994, 1995, 1996, 1997
|
||||
dnl The Regents of the University of California. All rights reserved.
|
||||
|
@ -6,7 +6,7 @@ dnl
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl
|
||||
|
||||
AC_REVISION($Revision: 1.138.2.8 $)
|
||||
AC_REVISION($Revision: 1.138.2.9 $)
|
||||
AC_PREREQ(2.50)
|
||||
AC_INIT(pcap.c)
|
||||
|
||||
|
@ -372,6 +372,19 @@ else
|
|||
fi
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING(for socklen_t)
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
],
|
||||
[ socklen_t x; ],
|
||||
have_socklen_t=yes,
|
||||
have_socklen_t=no)
|
||||
if test "x$have_socklen_t" = "xyes"; then
|
||||
AC_DEFINE(HAVE_SOCKLEN_T, 1)
|
||||
fi
|
||||
AC_MSG_RESULT($have_socklen_t)
|
||||
|
||||
AC_MSG_CHECKING(if --enable-ipv6 option is specified)
|
||||
AC_ARG_ENABLE(ipv6, [ --enable-ipv6 build IPv6-capable version])
|
||||
if test "$enable_ipv6" = "yes"; then
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.129.2.9 2008-02-08 01:36:39 guy Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/libpcap/pcap-linux.c,v 1.129.2.10 2008-03-14 09:13:33 guy Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -174,7 +174,7 @@ static const char rcsid[] _U_ =
|
|||
#include <linux/filter.h>
|
||||
#endif
|
||||
|
||||
#ifndef __GLIBC__
|
||||
#ifndef HAVE_SOCKLEN_T
|
||||
typedef int socklen_t;
|
||||
#endif
|
||||
|
||||
|
|
Reference in New Issue