aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2012-12-26 15:02:32 +0000
committerAnders Broman <anders.broman@ericsson.com>2012-12-26 15:02:32 +0000
commit8106e33188bf9c5b1b126fc3b15ff3e83bd36f3f (patch)
tree48582193ea46d6ba8b837876c72238f8905c2f09
parent6cb00759ccbdb9d65f8b79132b4f9564f369e0e3 (diff)
Make dumpcap build on Windows
svn path=/trunk/; revision=46788
-rw-r--r--dumpcap.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/dumpcap.c b/dumpcap.c
index 58d3eaea36..ed25708519 100644
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -250,9 +250,12 @@ typedef struct _pcap_options {
gboolean cap_pipe_byte_swapped; /* TRUE if data in the pipe is byte swapped */
#if defined(_WIN32)
char * cap_pipe_buf; /* Pointer to the data buffer we read into */
-#endif
+ DWORD cap_pipe_bytes_to_read; /* Used by cap_pipe_dispatch */
+ DWORD cap_pipe_bytes_read; /* Used by cap_pipe_dispatch */
+#else
size_t cap_pipe_bytes_to_read; /* Used by cap_pipe_dispatch */
size_t cap_pipe_bytes_read; /* Used by cap_pipe_dispatch */
+#endif
enum {
STATE_EXPECT_REC_HDR,
STATE_READ_REC_HDR,
@@ -280,7 +283,7 @@ typedef struct _loop_data {
/* output file(s) */
FILE *pdh;
int save_file_fd;
- long bytes_written;
+ guint64 bytes_written;
guint32 autostop_files;
} loop_data;
@@ -1713,11 +1716,11 @@ cap_pipe_read(int pipe_fd, char *buf, size_t sz, gboolean from_socket _U_)
static void *cap_thread_read(void *arg)
{
pcap_options *pcap_opts;
- size_t bytes_read;
#ifdef _WIN32
BOOL res;
- DWORD b, last_err;
+ DWORD b, last_err, bytes_read;
#else /* _WIN32 */
+ size_t bytes_read;
int b;
#endif /* _WIN32 */