From b9bdce8484ffd1b2447b801f6b74c911c12776c1 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Sun, 21 Feb 2021 12:57:15 -0800 Subject: [PATCH] NetPerfMeter: Fix compilation on Windows. Use guint64 instead of u_int64_t. GLib might make it easier to use standard types at some point[1] but they haven't yet. Make our offsets unsigned. [1]https://gitlab.gnome.org/GNOME/glib/-/issues/1484 --- epan/dissectors/packet-netperfmeter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epan/dissectors/packet-netperfmeter.c b/epan/dissectors/packet-netperfmeter.c index 77ae6354638..d8839bb08ba 100644 --- a/epan/dissectors/packet-netperfmeter.c +++ b/epan/dissectors/packet-netperfmeter.c @@ -34,12 +34,12 @@ static gint ett_onoffarray = -1; /* Initialize the protocol and registered fields */ #define INIT_FIELD(variable, offset, length) \ static int hf_##variable = -1; \ - static const int offset_##variable = offset; \ + static const unsigned int offset_##variable = offset; \ static const int length_##variable = length; #define INIT_FIELD_WITHOUT_LEN(variable, offset) \ static int hf_##variable = -1; \ - static const int offset_##variable = offset; + static const unsigned int offset_##variable = offset; #define NETPERFMETER_ACKNOWLEDGE 0x01 #define NETPERFMETER_ADD_FLOW 0x02 @@ -328,7 +328,7 @@ static void dissect_npmp_data_message(tvbuff_t *message_tvb, proto_tree *message_tree) { const guint16 message_length = tvb_get_ntohs(message_tvb, offset_message_length); - u_int64_t timestamp; + guint64 timestamp; nstime_t t; ADD_FIELD_UINT(message_tree, data_flowid);