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);
 		}