[openssh-commits] [openssh] 01/01: openbsd-compat/bsd-asprintf: add <stdio.h> include for vsnprintf

git+noreply at mindrot.org git+noreply at mindrot.org
Thu Sep 8 12:05:03 AEST 2022

This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit be197635329feb839865fdc738e34e24afd1fca8
Author: Sam James <sam at gentoo.org>
Date:   Thu Sep 8 02:49:29 2022 +0100

    openbsd-compat/bsd-asprintf: add <stdio.h> include for vsnprintf
    Fixes the following build failure with Clang 15 on musl:
    bsd-asprintf.c:51:8: error: call to undeclared library function 'vsnprintf' with type 'int (char *, unsigned long, const char *, struct __va_list_tag *)'; ISO C99 and laterclang -O2 -pipe -fdiagnostics-color=always -frecord-gcc-switches -pipe -Wunknown-warning-option -Qunused-arguments -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result -Wmisleading-indentation -Wbitwise-instead-of-logical -fno-strict-a [...]
     do not support
          implicit function declarations [-Wimplicit-function-declaration]
            ret = vsnprintf(string, INIT_SZ, fmt, ap2);
    bsd-asprintf.c:51:8: note: include the header <stdio.h> or explicitly provide a declaration for 'vsnprintf'
    1 error generated.
 openbsd-compat/bsd-asprintf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/openbsd-compat/bsd-asprintf.c b/openbsd-compat/bsd-asprintf.c
index 10927727..511c817b 100644
--- a/openbsd-compat/bsd-asprintf.c
+++ b/openbsd-compat/bsd-asprintf.c
@@ -32,6 +32,7 @@
 #include <errno.h>
 #include <stdarg.h>
+#include <stdio.h>
 #include <stdlib.h>
 #define INIT_SZ	128

To stop receiving notification emails like this one, please contact
djm at mindrot.org.

More information about the openssh-commits mailing list