[PATCH] add missing <stdio.h> include to unit tests for printf

Damien Miller djm at mindrot.org
Tue Mar 31 16:33:34 AEDT 2026


merged, thanks

On Mon, 30 Mar 2026, Michael Forney wrote:

> This fixes the build with --without-openssl on musl. glibc worked
> previously because it got stdio.h implicitly through resolv.h.
> ---
>  regress/unittests/kex/tests.c    | 4 ++++
>  regress/unittests/sshkey/tests.c | 2 ++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/regress/unittests/kex/tests.c b/regress/unittests/kex/tests.c
> index a3ef19ef4..d8a38e04a 100644
> --- a/regress/unittests/kex/tests.c
> +++ b/regress/unittests/kex/tests.c
> @@ -3,6 +3,10 @@
>   * Placed in the public domain
>   */
>  
> +#include "includes.h"
> +
> +#include <stdio.h>
> +
>  #include "../test_helper/test_helper.h"
>  
>  void kex_tests(void);
> diff --git a/regress/unittests/sshkey/tests.c b/regress/unittests/sshkey/tests.c
> index 5511e7b89..426543bd7 100644
> --- a/regress/unittests/sshkey/tests.c
> +++ b/regress/unittests/sshkey/tests.c
> @@ -7,6 +7,8 @@
>  
>  #include "includes.h"
>  
> +#include <stdio.h>
> +
>  #include "../test_helper/test_helper.h"
>  
>  void sshkey_tests(void);
> -- 
> 2.49.0
> 
> _______________________________________________
> openssh-unix-dev mailing list
> openssh-unix-dev at mindrot.org
> https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
> 


More information about the openssh-unix-dev mailing list