Skip to content

Commit

Permalink
NetPerfMeter: Fix compilation on Windows.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
geraldcombs committed Feb 21, 2021
1 parent dc3e92f commit b9bdce8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions epan/dissectors/packet-netperfmeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b9bdce8

Please sign in to comment.