Some systems (*cough*Irix*cough) not only don't declare
"ether_hostton()" but don't even declare "struct ether_addr"; on those systems, declare "struct ether_addr".
This commit is contained in:
parent
2f97b1a82c
commit
65dd7c80dc
|
@ -83,6 +83,9 @@
|
||||||
/* Define to 1 if you have the `strlcpy' function. */
|
/* Define to 1 if you have the `strlcpy' function. */
|
||||||
#undef HAVE_STRLCPY
|
#undef HAVE_STRLCPY
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct ether_addr'. */
|
||||||
|
#undef HAVE_STRUCT_ETHER_ADDR
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/bufmod.h> header file. */
|
/* Define to 1 if you have the <sys/bufmod.h> header file. */
|
||||||
#undef HAVE_SYS_BUFMOD_H
|
#undef HAVE_SYS_BUFMOD_H
|
||||||
|
|
||||||
|
|
24
configure.in
24
configure.in
|
@ -1,4 +1,4 @@
|
||||||
dnl @(#) $Header: /tcpdump/master/libpcap/configure.in,v 1.120.2.2 2005-04-19 00:51:38 guy Exp $ (LBL)
|
dnl @(#) $Header: /tcpdump/master/libpcap/configure.in,v 1.120.2.3 2005-04-20 11:13:50 guy Exp $ (LBL)
|
||||||
dnl
|
dnl
|
||||||
dnl Copyright (c) 1994, 1995, 1996, 1997
|
dnl Copyright (c) 1994, 1995, 1996, 1997
|
||||||
dnl The Regents of the University of California. All rights reserved.
|
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 Process this file with autoconf to produce a configure script.
|
||||||
dnl
|
dnl
|
||||||
|
|
||||||
AC_REVISION($Revision: 1.120.2.2 $)
|
AC_REVISION($Revision: 1.120.2.3 $)
|
||||||
AC_PREREQ(2.50)
|
AC_PREREQ(2.50)
|
||||||
AC_INIT(pcap.c)
|
AC_INIT(pcap.c)
|
||||||
|
|
||||||
|
@ -126,6 +126,26 @@ struct rtentry;
|
||||||
])
|
])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
#
|
||||||
|
# Is ether_hostton() declared?
|
||||||
|
#
|
||||||
|
if test "$ac_cv_have_decl_ether_hostton" != yes; then
|
||||||
|
#
|
||||||
|
# No, we'll have to declare it ourselves.
|
||||||
|
# Do we have "struct ether_addr"?
|
||||||
|
#
|
||||||
|
AC_CHECK_TYPES(struct ether_addr,,,
|
||||||
|
[
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
struct mbuf;
|
||||||
|
struct rtentry;
|
||||||
|
#include <net/if.h>
|
||||||
|
#include <netinet/if_ether.h>
|
||||||
|
])
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl to pacify those who hate protochain insn
|
dnl to pacify those who hate protochain insn
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static const char rcsid[] _U_ =
|
static const char rcsid[] _U_ =
|
||||||
"@(#) $Header: /tcpdump/master/libpcap/nametoaddr.c,v 1.77.2.2 2005-04-20 10:38:03 guy Exp $ (LBL)";
|
"@(#) $Header: /tcpdump/master/libpcap/nametoaddr.c,v 1.77.2.3 2005-04-20 11:13:51 guy Exp $ (LBL)";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
|
@ -458,6 +458,11 @@ pcap_ether_hostton(const char *name)
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#if !defined(HAVE_DECL_ETHER_HOSTTON) || !HAVE_DECL_ETHER_HOSTTON
|
#if !defined(HAVE_DECL_ETHER_HOSTTON) || !HAVE_DECL_ETHER_HOSTTON
|
||||||
|
#ifndef HAVE_STRUCT_ETHER_ADDR
|
||||||
|
struct ether_addr {
|
||||||
|
unsigned char ether_addr_octet[6];
|
||||||
|
};
|
||||||
|
#endif
|
||||||
extern int ether_hostton(const char *, struct ether_addr *);
|
extern int ether_hostton(const char *, struct ether_addr *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Reference in New Issue