summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--text2pcap-scanner.l6
-rw-r--r--text2pcap.c6
-rw-r--r--text2pcap.h2
3 files changed, 10 insertions, 4 deletions
diff --git a/text2pcap-scanner.l b/text2pcap-scanner.l
index 1f45f8efda..f422bca69a 100644
--- a/text2pcap-scanner.l
+++ b/text2pcap-scanner.l
@@ -25,6 +25,12 @@
*/
%option noyywrap
+/*
+ * Prefix scanner routines with "text2pcap_" rather than "yy" to avoid a
+ * "redefined macro" warning with flex 2.6.3.
+ */
+%option prefix="text2pcap_"
+
%{
/********************************************************************************
diff --git a/text2pcap.c b/text2pcap.c
index 3ecc3511f9..851cb299b3 100644
--- a/text2pcap.c
+++ b/text2pcap.c
@@ -245,7 +245,7 @@ static FILE *output_file = NULL;
/* Offset base to parse */
static guint32 offset_base = 16;
-extern FILE *yyin;
+extern FILE *text2pcap_in;
/* ----- State machine -----------------------------------------------------------*/
@@ -1899,8 +1899,8 @@ main(int argc, char *argv[])
}
curr_offset = header_length;
- yyin = input_file;
- if (yylex() == EXIT_SUCCESS) {
+ text2pcap_in = input_file;
+ if (text2pcap_lex() == EXIT_SUCCESS) {
if (write_current_packet(FALSE) != EXIT_SUCCESS)
ret = EXIT_FAILURE;
} else {
diff --git a/text2pcap.h b/text2pcap.h
index 3ec6b02638..fd3a46202c 100644
--- a/text2pcap.h
+++ b/text2pcap.h
@@ -42,7 +42,7 @@ typedef enum {
int parse_token(token_t token, char *str);
-int yylex(void);
+int text2pcap_lex(void);
#endif