diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index 5978753fbb5e486266985c850ae09f6ac3d9cec3..91fb8955c98b119d2fa5051b55ccbecd195bb7ee 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -1991,7 +1991,7 @@ static int socket_read(int *id, int fd, short events, void *cbdata)
 		return 1;
 	}
 	if (res < sizeof(struct dundi_hdr)) {
-		ast_log(LOG_WARNING, "midget packet received (%d of %ld min)\n", res, sizeof(struct dundi_hdr));
+		ast_log(LOG_WARNING, "midget packet received (%d of %d min)\n", res, (int)sizeof(struct dundi_hdr));
 		return 1;
 	}
 	buf[res] = '\0';