fixes musl build. backported from postfix-3.12_pre20260514

--- a/src/util/sys_defs.h	2026-04-29 19:38:54.000000000 +0200
+++ b/src/util/sys_defs.h	2026-05-14 22:42:53.000000000 +0200
@@ -797,8 +797,6 @@
 #if HAVE_GLIBC_API_VERSION_SUPPORT(2, 1)
 #define SOCKADDR_SIZE	socklen_t
 #define SOCKOPT_SIZE	socklen_t
-#else
-#define NO_SNPRINTF
 #endif
 #ifndef NO_IPV6
 #define HAS_IPV6
--- a/src/util/vbuf_print.c	2026-04-13 23:22:20.000000000 +0200
+++ b/src/util/vbuf_print.c	2026-05-14 22:42:53.000000000 +0200
@@ -129,8 +129,11 @@
 	VBUF_SKIP(bp); \
     } while (0)
 #else
-#define VBUF_SNPRINTF(bp, sz, fmt, arg) do { \
-	if (VBUF_SPACE((bp), (sz)) != 0) \
+#define VBUF_SNPRINTF(bp, width_or_prec, type_space, fmt, arg) do { \
+	if ((width_or_prec) > INT_MAX - (type_space)) \
+	    msg_panic("vbuf_print: field width (%d + %lu) > INT_MAX", \
+		(width_or_prec), (unsigned long) (type_space)); \
+	if (VBUF_SPACE((bp), (width_or_prec) + (type_space)) != 0) \
 	    return (bp); \
 	sprintf((char *) (bp)->ptr, (fmt), (arg)); \
 	VBUF_SKIP(bp); \
