[openssh-commits] [openssh] 01/11: Fill in missing system header files.

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Sep 5 18:10:21 AEST 2025


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

dtucker pushed a commit to branch master
in repository openssh.

commit 9b2c5a2db0650e394597839ef00d797f57568937
Author: Darren Tucker <dtucker at dtucker.net>
AuthorDate: Fri Sep 5 17:06:14 2025 +1000

    Fill in missing system header files.
    
    Create replacement header files inside openbsd-compat for common headers
    that are missing on a given platform.  Usually these are just empty,
    but in some cases they'll include the equivalent file.  This avoids
    having to wrap those includes in '#ifdef HAVE_FOO_H' and reduces the
    diff vs OpenBSD.
    
    If we create any such headers, add the path to includes.
    
    Initially just stdint.h, more to follow.
    
    ok djm@
---
 auth-options.c                                       |  4 +---
 channels.c                                           |  4 +---
 configure.ac                                         | 17 ++++++++++++++++-
 crypto_api.h                                         |  4 +---
 kexmlkem768x25519.c                                  |  2 --
 misc.c                                               |  4 +---
 monitor.c                                            |  4 +---
 openbsd-compat/arc4random.c                          |  2 --
 openbsd-compat/arc4random_uniform.c                  |  4 +---
 openbsd-compat/glob.c                                |  2 --
 openbsd-compat/memmem.c                              |  2 --
 openbsd-compat/reallocarray.c                        |  2 --
 openbsd-compat/recallocarray.c                       |  2 --
 poly1305.c                                           |  4 +---
 regress/misc/sk-dummy/sk-dummy.c                     |  2 --
 regress/unittests/authopt/tests.c                    |  2 --
 regress/unittests/bitmap/tests.c                     |  2 --
 regress/unittests/conversion/tests.c                 |  2 --
 regress/unittests/hostkeys/test_iterate.c            |  2 --
 regress/unittests/kex/test_kex.c                     |  2 --
 regress/unittests/kex/test_proposal.c                |  2 --
 regress/unittests/match/tests.c                      |  2 --
 regress/unittests/misc/test_argv.c                   |  2 --
 regress/unittests/misc/test_convtime.c               |  2 --
 regress/unittests/misc/test_expand.c                 |  2 --
 regress/unittests/misc/test_hpdelim.c                |  2 --
 regress/unittests/misc/test_parse.c                  |  2 --
 regress/unittests/misc/test_ptimeout.c               |  4 +---
 regress/unittests/misc/test_strdelim.c               |  2 --
 regress/unittests/misc/test_xextendf.c               |  2 --
 regress/unittests/misc/tests.c                       |  2 --
 regress/unittests/sshbuf/test_sshbuf.c               |  4 +---
 regress/unittests/sshbuf/test_sshbuf_fixed.c         |  4 +---
 regress/unittests/sshbuf/test_sshbuf_fuzz.c          |  4 +---
 regress/unittests/sshbuf/test_sshbuf_getput_basic.c  |  4 +---
 regress/unittests/sshbuf/test_sshbuf_getput_crypto.c |  4 +---
 regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c   |  4 +---
 regress/unittests/sshbuf/test_sshbuf_misc.c          |  4 +---
 regress/unittests/sshkey/common.c                    |  2 --
 regress/unittests/sshkey/test_file.c                 |  2 --
 regress/unittests/sshkey/test_fuzz.c                 |  2 --
 regress/unittests/sshkey/test_sshkey.c               |  2 --
 regress/unittests/sshsig/tests.c                     |  2 --
 regress/unittests/test_helper/fuzz.c                 |  4 +---
 regress/unittests/test_helper/test_helper.c          |  4 +---
 regress/unittests/test_helper/test_helper.h          |  4 +---
 scp.c                                                |  4 +---
 sk-api.h                                             |  2 --
 sk-usbhid.c                                          |  4 +---
 ssh-keygen.c                                         |  4 +---
 ssh-sk.c                                             |  4 +---
 sshbuf-getput-basic.c                                |  4 +---
 sshbuf-misc.c                                        |  4 +---
 umac.c                                               |  2 --
 xmalloc.c                                            |  4 +---
 55 files changed, 41 insertions(+), 134 deletions(-)

diff --git a/auth-options.c b/auth-options.c
index c89b1ee58..785a23990 100644
--- a/auth-options.c
+++ b/auth-options.c
@@ -24,9 +24,7 @@
 #include <pwd.h>
 #include <string.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 #include <stdarg.h>
 #include <ctype.h>
 #include <limits.h>
diff --git a/channels.c b/channels.c
index 67ee07387..5dbf428aa 100644
--- a/channels.c
+++ b/channels.c
@@ -61,9 +61,7 @@
 #include <poll.h>
 #endif
 #include <stdarg.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/configure.ac b/configure.ac
index 71766ba10..fffe2f407 100644
--- a/configure.ac
+++ b/configure.ac
@@ -489,7 +489,6 @@ AC_CHECK_HEADERS([ \
 	sha2.h \
 	shadow.h \
 	stddef.h \
-	stdint.h \
 	string.h \
 	strings.h \
 	sys/bitypes.h \
@@ -531,6 +530,22 @@ AC_CHECK_HEADERS([ \
 	wchar.h \
 ])
 
+# Create replacement header files for common headers that are missing on this
+# platform.  Usually these are just empty, but in some cases they'll include
+# the equivalent file.  This avoids having to wrap those includes in
+# '#ifdef HAVE_FOO_H'.  If we create any such headers, add the path to includes.
+compatincludes=no
+AC_CHECK_HEADERS([stdint.h], [], [
+    compatincludes="`pwd`/openbsd-compat/include"
+    mkdir -p "$compatincludes"
+    case "$ac_header" in
+    *)      ;;
+    esac >"$compatincludes/$ac_header"
+])
+if test "$compatincludes" != "no"; then
+    CPPFLAGS="$CPPFLAGS -I$compatincludes"
+fi
+
 AC_CHECK_DECLS([le32toh, le64toh, htole64], [], [], [
 #ifdef HAVE_SYS_TYPES_H
 # include <sys/types.h>
diff --git a/crypto_api.h b/crypto_api.h
index 8bbc3a08a..693b67bbc 100644
--- a/crypto_api.h
+++ b/crypto_api.h
@@ -10,9 +10,7 @@
 
 #include "includes.h"
 
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 #include <stdlib.h>
 
 typedef int8_t crypto_int8;
diff --git a/kexmlkem768x25519.c b/kexmlkem768x25519.c
index 2b5d39608..7ade7a7f9 100644
--- a/kexmlkem768x25519.c
+++ b/kexmlkem768x25519.c
@@ -28,9 +28,7 @@
 #include <sys/types.h>
 
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdbool.h>
 #include <string.h>
 #include <signal.h>
diff --git a/misc.c b/misc.c
index 183332082..4e09f2b4b 100644
--- a/misc.c
+++ b/misc.c
@@ -42,9 +42,7 @@
 #include <signal.h>
 #include <stdarg.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
diff --git a/monitor.c b/monitor.c
index 129ff4ccb..d0a2b3f50 100644
--- a/monitor.c
+++ b/monitor.c
@@ -39,9 +39,7 @@
 #endif
 #include <pwd.h>
 #include <signal.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 #include <stdarg.h>
diff --git a/openbsd-compat/arc4random.c b/openbsd-compat/arc4random.c
index ffd33734d..376a893d2 100644
--- a/openbsd-compat/arc4random.c
+++ b/openbsd-compat/arc4random.c
@@ -32,9 +32,7 @@
 #include <fcntl.h>
 #include <limits.h>
 #include <signal.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
diff --git a/openbsd-compat/arc4random_uniform.c b/openbsd-compat/arc4random_uniform.c
index 591f92d15..59d516884 100644
--- a/openbsd-compat/arc4random_uniform.c
+++ b/openbsd-compat/arc4random_uniform.c
@@ -20,9 +20,7 @@
 
 #include "includes.h"
 
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 #include <stdlib.h>
 
 #ifndef HAVE_ARC4RANDOM_UNIFORM
diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c
index e89151789..330b9c0aa 100644
--- a/openbsd-compat/glob.c
+++ b/openbsd-compat/glob.c
@@ -70,9 +70,7 @@
 #include <limits.h>
 #include <pwd.h>
 #include <stdlib.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <string.h>
 #include <unistd.h>
 
diff --git a/openbsd-compat/memmem.c b/openbsd-compat/memmem.c
index 2637401d7..afc20c669 100644
--- a/openbsd-compat/memmem.c
+++ b/openbsd-compat/memmem.c
@@ -30,9 +30,7 @@
 #ifndef HAVE_MEMMEM
 
 #include <string.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 
 static char *
 twobyte_memmem(const unsigned char *h, size_t k, const unsigned char *n)
diff --git a/openbsd-compat/reallocarray.c b/openbsd-compat/reallocarray.c
index 1a52acc62..cffe9b5ef 100644
--- a/openbsd-compat/reallocarray.c
+++ b/openbsd-compat/reallocarray.c
@@ -22,9 +22,7 @@
 
 #include <sys/types.h>
 #include <errno.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdlib.h>
 
 /*
diff --git a/openbsd-compat/recallocarray.c b/openbsd-compat/recallocarray.c
index 3e1156ce2..c281f75e9 100644
--- a/openbsd-compat/recallocarray.c
+++ b/openbsd-compat/recallocarray.c
@@ -22,9 +22,7 @@
 
 #include <errno.h>
 #include <stdlib.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <string.h>
 #include <unistd.h>
 
diff --git a/poly1305.c b/poly1305.c
index de4d88770..c6747161c 100644
--- a/poly1305.c
+++ b/poly1305.c
@@ -7,9 +7,7 @@
 #include "includes.h"
 
 #include <sys/types.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 
 #include "poly1305.h"
 
diff --git a/regress/misc/sk-dummy/sk-dummy.c b/regress/misc/sk-dummy/sk-dummy.c
index afa0314da..4c96e8827 100644
--- a/regress/misc/sk-dummy/sk-dummy.c
+++ b/regress/misc/sk-dummy/sk-dummy.c
@@ -17,9 +17,7 @@
 
 #include "includes.h"
 
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
diff --git a/regress/unittests/authopt/tests.c b/regress/unittests/authopt/tests.c
index 5285f0db5..a81dffbf7 100644
--- a/regress/unittests/authopt/tests.c
+++ b/regress/unittests/authopt/tests.c
@@ -10,9 +10,7 @@
 
 #include <sys/types.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/regress/unittests/bitmap/tests.c b/regress/unittests/bitmap/tests.c
index b8eae2313..6470f983d 100644
--- a/regress/unittests/bitmap/tests.c
+++ b/regress/unittests/bitmap/tests.c
@@ -9,9 +9,7 @@
 
 #include <sys/types.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/regress/unittests/conversion/tests.c b/regress/unittests/conversion/tests.c
index d65e6326f..fce4d1ca7 100644
--- a/regress/unittests/conversion/tests.c
+++ b/regress/unittests/conversion/tests.c
@@ -9,9 +9,7 @@
 
 #include <sys/types.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/regress/unittests/hostkeys/test_iterate.c b/regress/unittests/hostkeys/test_iterate.c
index 0139376f4..65d6d1f43 100644
--- a/regress/unittests/hostkeys/test_iterate.c
+++ b/regress/unittests/hostkeys/test_iterate.c
@@ -9,9 +9,7 @@
 
 #include <sys/types.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/regress/unittests/kex/test_kex.c b/regress/unittests/kex/test_kex.c
index 0c33e80f8..16c2f2dff 100644
--- a/regress/unittests/kex/test_kex.c
+++ b/regress/unittests/kex/test_kex.c
@@ -10,9 +10,7 @@
 #include <sys/types.h>
 #include <sys/time.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/regress/unittests/kex/test_proposal.c b/regress/unittests/kex/test_proposal.c
index fa4192bb6..01bf7e589 100644
--- a/regress/unittests/kex/test_proposal.c
+++ b/regress/unittests/kex/test_proposal.c
@@ -10,9 +10,7 @@
 #include <sys/types.h>
 #include <signal.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/regress/unittests/match/tests.c b/regress/unittests/match/tests.c
index 2ca6c769a..163a3a255 100644
--- a/regress/unittests/match/tests.c
+++ b/regress/unittests/match/tests.c
@@ -9,9 +9,7 @@
 
 #include <sys/types.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/regress/unittests/misc/test_argv.c b/regress/unittests/misc/test_argv.c
index 682863e73..a20a9e78f 100644
--- a/regress/unittests/misc/test_argv.c
+++ b/regress/unittests/misc/test_argv.c
@@ -9,9 +9,7 @@
 
 #include <sys/types.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/regress/unittests/misc/test_convtime.c b/regress/unittests/misc/test_convtime.c
index 4794dbd9d..4fdcf3812 100644
--- a/regress/unittests/misc/test_convtime.c
+++ b/regress/unittests/misc/test_convtime.c
@@ -10,9 +10,7 @@
 #include <sys/types.h>
 #include <limits.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/regress/unittests/misc/test_expand.c b/regress/unittests/misc/test_expand.c
index 6f2cd8adb..b72a1e9a8 100644
--- a/regress/unittests/misc/test_expand.c
+++ b/regress/unittests/misc/test_expand.c
@@ -9,9 +9,7 @@
 
 #include <sys/types.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/regress/unittests/misc/test_hpdelim.c b/regress/unittests/misc/test_hpdelim.c
index d423023dc..626f18564 100644
--- a/regress/unittests/misc/test_hpdelim.c
+++ b/regress/unittests/misc/test_hpdelim.c
@@ -9,9 +9,7 @@
 
 #include <sys/types.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/regress/unittests/misc/test_parse.c b/regress/unittests/misc/test_parse.c
index c66028aec..cbffbe0fd 100644
--- a/regress/unittests/misc/test_parse.c
+++ b/regress/unittests/misc/test_parse.c
@@ -9,9 +9,7 @@
 
 #include <sys/types.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/regress/unittests/misc/test_ptimeout.c b/regress/unittests/misc/test_ptimeout.c
index cc58ee854..359a460cc 100644
--- a/regress/unittests/misc/test_ptimeout.c
+++ b/regress/unittests/misc/test_ptimeout.c
@@ -9,9 +9,7 @@
 
 #include <sys/types.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 #ifdef HAVE_POLL_H
diff --git a/regress/unittests/misc/test_strdelim.c b/regress/unittests/misc/test_strdelim.c
index f7bea4bfe..ae0f71556 100644
--- a/regress/unittests/misc/test_strdelim.c
+++ b/regress/unittests/misc/test_strdelim.c
@@ -9,9 +9,7 @@
 
 #include <sys/types.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/regress/unittests/misc/test_xextendf.c b/regress/unittests/misc/test_xextendf.c
index 133633dc6..3c1ee8b8b 100644
--- a/regress/unittests/misc/test_xextendf.c
+++ b/regress/unittests/misc/test_xextendf.c
@@ -9,9 +9,7 @@
 
 #include <sys/types.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/regress/unittests/misc/tests.c b/regress/unittests/misc/tests.c
index 578bc1d90..a71dde727 100644
--- a/regress/unittests/misc/tests.c
+++ b/regress/unittests/misc/tests.c
@@ -9,9 +9,7 @@
 
 #include <sys/types.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/regress/unittests/sshbuf/test_sshbuf.c b/regress/unittests/sshbuf/test_sshbuf.c
index e22b390fe..dc021ba90 100644
--- a/regress/unittests/sshbuf/test_sshbuf.c
+++ b/regress/unittests/sshbuf/test_sshbuf.c
@@ -10,9 +10,7 @@
 
 #include <sys/types.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/regress/unittests/sshbuf/test_sshbuf_fixed.c b/regress/unittests/sshbuf/test_sshbuf_fixed.c
index dff77f042..cc05025a8 100644
--- a/regress/unittests/sshbuf/test_sshbuf_fixed.c
+++ b/regress/unittests/sshbuf/test_sshbuf_fixed.c
@@ -10,9 +10,7 @@
 
 #include <sys/types.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/regress/unittests/sshbuf/test_sshbuf_fuzz.c b/regress/unittests/sshbuf/test_sshbuf_fuzz.c
index c0b809dcd..51838ee72 100644
--- a/regress/unittests/sshbuf/test_sshbuf_fuzz.c
+++ b/regress/unittests/sshbuf/test_sshbuf_fuzz.c
@@ -9,9 +9,7 @@
 
 #include <sys/types.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/regress/unittests/sshbuf/test_sshbuf_getput_basic.c b/regress/unittests/sshbuf/test_sshbuf_getput_basic.c
index b5aca1fb1..058bf17d4 100644
--- a/regress/unittests/sshbuf/test_sshbuf_getput_basic.c
+++ b/regress/unittests/sshbuf/test_sshbuf_getput_basic.c
@@ -9,9 +9,7 @@
 
 #include <sys/types.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/regress/unittests/sshbuf/test_sshbuf_getput_crypto.c b/regress/unittests/sshbuf/test_sshbuf_getput_crypto.c
index 46a96fdad..97ee853d8 100644
--- a/regress/unittests/sshbuf/test_sshbuf_getput_crypto.c
+++ b/regress/unittests/sshbuf/test_sshbuf_getput_crypto.c
@@ -11,9 +11,7 @@
 
 #include <sys/types.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c b/regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c
index 3b4895895..aa345c773 100644
--- a/regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c
+++ b/regress/unittests/sshbuf/test_sshbuf_getput_fuzz.c
@@ -9,9 +9,7 @@
 
 #include <sys/types.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/regress/unittests/sshbuf/test_sshbuf_misc.c b/regress/unittests/sshbuf/test_sshbuf_misc.c
index 80081c519..58f55eee8 100644
--- a/regress/unittests/sshbuf/test_sshbuf_misc.c
+++ b/regress/unittests/sshbuf/test_sshbuf_misc.c
@@ -9,9 +9,7 @@
 
 #include <sys/types.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/regress/unittests/sshkey/common.c b/regress/unittests/sshkey/common.c
index edb1d95fa..fa68e6d5b 100644
--- a/regress/unittests/sshkey/common.c
+++ b/regress/unittests/sshkey/common.c
@@ -11,9 +11,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
diff --git a/regress/unittests/sshkey/test_file.c b/regress/unittests/sshkey/test_file.c
index 49148aca0..e412b75d8 100644
--- a/regress/unittests/sshkey/test_file.c
+++ b/regress/unittests/sshkey/test_file.c
@@ -11,9 +11,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
diff --git a/regress/unittests/sshkey/test_fuzz.c b/regress/unittests/sshkey/test_fuzz.c
index 12d0e12ea..d0f47d7cf 100644
--- a/regress/unittests/sshkey/test_fuzz.c
+++ b/regress/unittests/sshkey/test_fuzz.c
@@ -11,9 +11,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
diff --git a/regress/unittests/sshkey/test_sshkey.c b/regress/unittests/sshkey/test_sshkey.c
index 9dbd91306..5d5a6bec3 100644
--- a/regress/unittests/sshkey/test_sshkey.c
+++ b/regress/unittests/sshkey/test_sshkey.c
@@ -9,9 +9,7 @@
 
 #include <sys/types.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/regress/unittests/sshsig/tests.c b/regress/unittests/sshsig/tests.c
index ef1a46edc..670d06718 100644
--- a/regress/unittests/sshsig/tests.c
+++ b/regress/unittests/sshsig/tests.c
@@ -11,9 +11,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
diff --git a/regress/unittests/test_helper/fuzz.c b/regress/unittests/test_helper/fuzz.c
index edad5e1f5..c2711c728 100644
--- a/regress/unittests/test_helper/fuzz.c
+++ b/regress/unittests/test_helper/fuzz.c
@@ -25,9 +25,7 @@
 #include <assert.h>
 #include <ctype.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 #include <signal.h>
diff --git a/regress/unittests/test_helper/test_helper.c b/regress/unittests/test_helper/test_helper.c
index 7783d65a4..51b80119b 100644
--- a/regress/unittests/test_helper/test_helper.c
+++ b/regress/unittests/test_helper/test_helper.c
@@ -29,9 +29,7 @@
 #include <math.h>
 #include <signal.h>
 #include <stdarg.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/regress/unittests/test_helper/test_helper.h b/regress/unittests/test_helper/test_helper.h
index 23338af38..4f7e2c87f 100644
--- a/regress/unittests/test_helper/test_helper.h
+++ b/regress/unittests/test_helper/test_helper.h
@@ -23,9 +23,7 @@
 #include "includes.h"
 
 #include <sys/types.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 
 #ifdef WITH_OPENSSL
 #include <openssl/bn.h>
diff --git a/scp.c b/scp.c
index 3cdbb7bd8..f7328e5b3 100644
--- a/scp.c
+++ b/scp.c
@@ -113,9 +113,7 @@
 #include <pwd.h>
 #include <signal.h>
 #include <stdarg.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/sk-api.h b/sk-api.h
index 08f567a9e..32d0f118b 100644
--- a/sk-api.h
+++ b/sk-api.h
@@ -19,9 +19,7 @@
 #define _SK_API_H 1
 
 #include <stddef.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 
 /* Flags */
 #define SSH_SK_USER_PRESENCE_REQD	0x01
diff --git a/sk-usbhid.c b/sk-usbhid.c
index c18c40df2..cd248811a 100644
--- a/sk-usbhid.c
+++ b/sk-usbhid.c
@@ -20,9 +20,7 @@
 
 #ifdef ENABLE_SK_INTERNAL
 
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 6e6288637..6803f3101 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -24,9 +24,7 @@
 #include "openbsd-compat/openssl-compat.h"
 #endif
 
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <netdb.h>
diff --git a/ssh-sk.c b/ssh-sk.c
index a2a7d7206..6bb1edc90 100644
--- a/ssh-sk.c
+++ b/ssh-sk.c
@@ -23,9 +23,7 @@
 
 #include <dlfcn.h>
 #include <stddef.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 #include <string.h>
 #include <stdio.h>
 
diff --git a/sshbuf-getput-basic.c b/sshbuf-getput-basic.c
index 5c71b0e53..2cc562b24 100644
--- a/sshbuf-getput-basic.c
+++ b/sshbuf-getput-basic.c
@@ -24,9 +24,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 
 #include "ssherr.h"
 #include "sshbuf.h"
diff --git a/sshbuf-misc.c b/sshbuf-misc.c
index 431809d90..7b11e4e17 100644
--- a/sshbuf-misc.c
+++ b/sshbuf-misc.c
@@ -22,9 +22,7 @@
 #include <netinet/in.h>
 #include <errno.h>
 #include <stdlib.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 #include <stdio.h>
 #include <limits.h>
 #include <string.h>
diff --git a/umac.c b/umac.c
index 94c5e817c..078434b8d 100644
--- a/umac.c
+++ b/umac.c
@@ -76,9 +76,7 @@
 #include <string.h>
 #include <stdarg.h>
 #include <stdio.h>
-#ifdef HAVE_STDINT_H
 #include <stdint.h>
-#endif
 #include <stdlib.h>
 #include <stddef.h>
 
diff --git a/xmalloc.c b/xmalloc.c
index bf1da4b89..a058f085c 100644
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -16,9 +16,7 @@
 #include "includes.h"
 
 #include <stdarg.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
+#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>

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


More information about the openssh-commits mailing list