diff options
author | rpaulo <rpaulo@FreeBSD.org> | 2010-10-29 18:43:23 +0000 |
---|---|---|
committer | rpaulo <rpaulo@FreeBSD.org> | 2010-10-29 18:43:23 +0000 |
commit | 22f795f2fd7f982a2847bc9fc73e297abc7e2fbf (patch) | |
tree | 99c17a1bdbff3dabc0f310509b912bf2775d2145 /contrib/libpcap/scanner.l | |
parent | 2631ae0f3d6c77323709cd35d1f7241624662320 (diff) | |
parent | 724e1a015907ca989c4e1cb30c7ee4e88f26fbff (diff) | |
download | FreeBSD-src-22f795f2fd7f982a2847bc9fc73e297abc7e2fbf.zip FreeBSD-src-22f795f2fd7f982a2847bc9fc73e297abc7e2fbf.tar.gz |
Merge libpcap-1.1.1.
Diffstat (limited to 'contrib/libpcap/scanner.l')
-rw-r--r-- | contrib/libpcap/scanner.l | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/contrib/libpcap/scanner.l b/contrib/libpcap/scanner.l index 551b2cc..9d981d7 100644 --- a/contrib/libpcap/scanner.l +++ b/contrib/libpcap/scanner.l @@ -24,13 +24,27 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/scanner.l,v 1.110.2.2 2008/02/06 10:21:47 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/scanner.l,v 1.112 2008-02-06 10:21:30 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H #include "config.h" #endif +#ifdef WIN32 +#include <pcap-stdinc.h> +#else /* WIN32 */ +#if HAVE_INTTYPES_H +#include <inttypes.h> +#elif HAVE_STDINT_H +#include <stdint.h> +#endif +#ifdef HAVE_SYS_BITYPES_H +#include <sys/bitypes.h> +#endif +#include <sys/types.h> +#endif /* WIN32 */ + #include <ctype.h> #include <string.h> @@ -68,7 +82,7 @@ static inline int xdtoi(int); #define YY_NO_UNPUT static YY_BUFFER_STATE in_buffer; #else -static char *in_buffer; +static const char *in_buffer; #undef getc #define getc(fp) (*in_buffer == 0 ? EOF : *in_buffer++) @@ -335,6 +349,7 @@ ${B} { yylval.e = pcap_ether_aton(((char *)yytext)+1); if (getaddrinfo(yytext, NULL, &hints, &res)) bpf_error("bogus IPv6 address %s", yytext); else { + freeaddrinfo(res); yylval.s = sdup((char *)yytext); return HID6; } #else |