summaryrefslogtreecommitdiff
path: root/text2pcap.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2011-10-21 01:03:48 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2011-10-21 01:03:48 +0000
commite925843f90521a5b48b24350f1b0c0f2a7987d42 (patch)
tree4133db7215c04004ac5367862841b6bcfa8feccf /text2pcap.c
parent0c83f1655a15fb64ff3e56231c09eeca382e793d (diff)
downloadwireshark-e925843f90521a5b48b24350f1b0c0f2a7987d42.tar.gz
Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3161 :
Solaris doesn't like _XOPEN_SOURCE being defined but with no value, at least when being compiled in C99-mode. So set it to 600 (XPG6); hopefully this won't break any other systems. svn path=/trunk/; revision=39501
Diffstat (limited to 'text2pcap.c')
-rw-r--r--text2pcap.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/text2pcap.c b/text2pcap.c
index 928eda4528..a9033d6d40 100644
--- a/text2pcap.c
+++ b/text2pcap.c
@@ -90,7 +90,7 @@
# define __USE_XOPEN
#endif
#ifndef _XOPEN_SOURCE
-# define _XOPEN_SOURCE
+# define _XOPEN_SOURCE 600
#endif
/*
@@ -275,7 +275,7 @@ typedef struct {
guint32 dest_addr;
} hdr_ip_t;
-static hdr_ip_t HDR_IP = {0x45, 0, 0, 0x3412, 0, 0, 0xff, 0, 0,
+static hdr_ip_t HDR_IP = {0x45, 0, 0, 0x3412, 0, 0, 0xff, 0, 0,
#ifdef WORDS_BIGENDIAN
0x0a010101, 0x0a020202
#else
@@ -944,7 +944,7 @@ parse_token (token_t token, char *str)
fprintf(stderr, "(%s, %s \"%s\") -> (",
state_str[state], token_str[token], str ? str : "");
}
-
+
/* First token must be treated as a timestamp if time strip format is
not empty */
if (state == INIT || state == START_OF_LINE) {
@@ -1074,11 +1074,11 @@ parse_token (token_t token, char *str)
if (identify_ascii) {
/* Here a line of pkt bytes reading is finished
compare the ascii and hex to avoid such situation:
- "61 62 20 ab ", when ab is ascii dump then it should
+ "61 62 20 ab ", when ab is ascii dump then it should
not be treat as byte */
rollback = 0;
- /* s2 is the ASCII string, s1 is the HEX string, e.g, when
- s2 = "ab ", s1 = "616220"
+ /* s2 is the ASCII string, s1 is the HEX string, e.g, when
+ s2 = "ab ", s1 = "616220"
we should find out the largest tail of s1 matches the head
of s2, it means the matched part in tail is the ASCII dump
of the head byte. These matched should be rollback */
@@ -1104,7 +1104,7 @@ parse_token (token_t token, char *str)
}
/* If packet line start contains possible byte pattern, the line end
should contain the matched pattern if the user open the -a flag.
- The packet will be possible invalid if the byte pattern cannot find
+ The packet will be possible invalid if the byte pattern cannot find
a matched one in the line of packet buffer.*/
if (rollback > 0) {
if (strncmp(pkt_lnstart+line_size-rollback, s2, rollback) == 0) {