From 555da2df56a58ac9098fa1178b1744e1277ad2d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Wed, 7 Feb 2024 17:34:02 -0500
Subject: [PATCH] Oh damn, this is an off_t + size_t + 1... talk about the wild
 west of types!

Both long long and long are reasonable for some mixes of platforms.

Just punt, cast the whole thing to int64_t, and forget about it.
---
 src/sbbs3/mailsrvr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/sbbs3/mailsrvr.c b/src/sbbs3/mailsrvr.c
index 69aecf95e5..91d54fb005 100644
--- a/src/sbbs3/mailsrvr.c
+++ b/src/sbbs3/mailsrvr.c
@@ -3204,8 +3204,8 @@ static bool smtp_client_thread(smtp_t* smtp)
 						safe_snprintf(str,sizeof(str),"%s%s%s",head,sender_addr,tail);
 
 					if((telegram_buf=(char*)malloc((size_t)(length+strlen(str)+1)))==NULL) {
-						lprintf(LOG_CRIT,"%04d %s %s !ERROR allocating %" XP_PRIsize_t "u bytes of memory for telegram from %s"
-							,socket, client.protocol, client_id, length+strlen(str)+1,sender_addr);
+						lprintf(LOG_CRIT,"%04d %s %s !ERROR allocating %" PRIu64 " bytes of memory for telegram from %s"
+							,socket, client.protocol, client_id, (uint64_t)(length+strlen(str)+1),sender_addr);
 						sockprintf(socket,client.protocol,session, insuf_stor);
 						continue;
 					}
-- 
GitLab