From 08eb93ff919ee6df65a067beb5bd32c01803d0df Mon Sep 17 00:00:00 2001 From: thorkill Date: Wed, 18 May 2016 23:24:07 +0200 Subject: [PATCH] Make it compile on FreeBSD on 32bit CPU --- src/protocol_auth.c | 2 +- src/protocol_misc.c | 2 +- src/protocol_subnet.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/protocol_auth.c b/src/protocol_auth.c index 08ddcce8..5de3fc75 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -747,7 +747,7 @@ static void send_everything(connection_t *c) { for splay_each(node_t, n, node_tree) { if ((!n->status.reachable) && ((now.tv_sec - n->last_state_change) >= keylifetime*2)) { - logger(DEBUG_CONNECTIONS, LOG_INFO, "Not forwarding informations about %s to %s (%ld / %d)", n->name, + logger(DEBUG_CONNECTIONS, LOG_INFO, "Not forwarding informations about %s to %s (%zu / %d)", n->name, c->name, now.tv_sec - n->last_state_change, keylifetime); continue; } diff --git a/src/protocol_misc.c b/src/protocol_misc.c index 91bb28c0..1168aac0 100644 --- a/src/protocol_misc.c +++ b/src/protocol_misc.c @@ -100,7 +100,7 @@ bool send_ping(connection_t *c) { c->status.pinged = true; c->last_ping_time = now; - return send_request(c, "%d %ld %ld", PING, c->last_ping_time.tv_sec, c->last_ping_time.tv_usec); + return send_request(c, "%d %zu %ld", PING, c->last_ping_time.tv_sec, c->last_ping_time.tv_usec); } bool ping_h(connection_t *c, const char *request) { diff --git a/src/protocol_subnet.c b/src/protocol_subnet.c index 9f7e52dc..44c46622 100644 --- a/src/protocol_subnet.c +++ b/src/protocol_subnet.c @@ -120,7 +120,7 @@ bool add_subnet_h(connection_t *c, const char *request) { logger(DEBUG_ALWAYS, LOG_WARNING, "Ignoring unauthorized %s from %s (%s): %s", "ADD_SUBNET", c->name, c->hostname, subnetstr); if ((!owner->status.reachable) && ((now.tv_sec - owner->last_state_change) >= keylifetime*2)) { - logger(DEBUG_CONNECTIONS, LOG_INFO, "Not forwarding informations about %s to ALL (%ld / %d)", owner->name, now.tv_sec - owner->last_state_change, keylifetime); + logger(DEBUG_CONNECTIONS, LOG_INFO, "Not forwarding informations about %s to ALL (%zu / %d)", owner->name, now.tv_sec - owner->last_state_change, keylifetime); } else { forward_request(c, request); }