[openssh-commits] [openssh] 03/11: Create replacement paths.h if needed.

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Sep 5 18:10:23 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 5f09983d1e724097bd577097fb0f2c00c2436f21
Author: Darren Tucker <dtucker at dtucker.net>
AuthorDate: Fri Sep 5 17:24:50 2025 +1000

    Create replacement paths.h if needed.
    
    Remove #ifdef HAVE_PATHS_H wrapper.  ok djm@
---
 auth.c         | 4 +---
 auth2-pubkey.c | 4 +---
 clientloop.c   | 2 --
 configure.ac   | 3 +--
 loginrec.c     | 4 +---
 misc.c         | 3 +--
 monitor.c      | 2 --
 mux.c          | 2 --
 readconf.c     | 4 +---
 readpass.c     | 4 +---
 session.c      | 2 --
 sftp.c         | 4 +---
 ssh-agent.c    | 4 +---
 ssh-keygen.c   | 4 +---
 ssh-keysign.c  | 2 --
 ssh.c          | 2 --
 sshconnect.c   | 2 --
 sshd-auth.c    | 4 +---
 sshd-session.c | 4 +---
 sshd.c         | 2 --
 sshpty.c       | 4 +---
 21 files changed, 13 insertions(+), 53 deletions(-)

diff --git a/auth.c b/auth.c
index 9a6e5a319..4f772fafd 100644
--- a/auth.c
+++ b/auth.c
@@ -35,9 +35,7 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <fcntl.h>
-#ifdef HAVE_PATHS_H
-# include <paths.h>
-#endif
+#include <paths.h>
 #include <pwd.h>
 #ifdef HAVE_LOGIN_H
 #include <login.h>
diff --git a/auth2-pubkey.c b/auth2-pubkey.c
index d7704e510..15ad3000c 100644
--- a/auth2-pubkey.c
+++ b/auth2-pubkey.c
@@ -30,9 +30,7 @@
 
 #include <stdlib.h>
 #include <errno.h>
-#ifdef HAVE_PATHS_H
-# include <paths.h>
-#endif
+#include <paths.h>
 #include <pwd.h>
 #include <signal.h>
 #include <stdio.h>
diff --git a/clientloop.c b/clientloop.c
index 38100d18a..4511ecf10 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -73,9 +73,7 @@
 
 #include <ctype.h>
 #include <errno.h>
-#ifdef HAVE_PATHS_H
 #include <paths.h>
-#endif
 #include <poll.h>
 #include <signal.h>
 #include <stdio.h>
diff --git a/configure.ac b/configure.ac
index 923a01af1..44023c330 100644
--- a/configure.ac
+++ b/configure.ac
@@ -480,7 +480,6 @@ AC_CHECK_HEADERS([ \
 	netdb.h \
 	netgroup.h \
 	pam/pam_appl.h \
-	paths.h \
 	pty.h \
 	readpassphrase.h \
 	rpc/types.h \
@@ -534,7 +533,7 @@ AC_CHECK_HEADERS([ \
 # 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([poll.h stdint.h], [], [
+AC_CHECK_HEADERS([paths.h poll.h stdint.h], [], [
     compatincludes="`pwd`/openbsd-compat/include"
     mkdir -p "$compatincludes"
     case "$ac_header" in
diff --git a/loginrec.c b/loginrec.c
index ffc3d1bbf..fa829fdf4 100644
--- a/loginrec.c
+++ b/loginrec.c
@@ -138,9 +138,7 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <fcntl.h>
-#ifdef HAVE_PATHS_H
-# include <paths.h>
-#endif
+#include <paths.h>
 #include <pwd.h>
 #include <stdarg.h>
 #include <stdio.h>
diff --git a/misc.c b/misc.c
index 728e80b04..a28ca0e75 100644
--- a/misc.c
+++ b/misc.c
@@ -56,8 +56,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <netdb.h>
-#ifdef HAVE_PATHS_H
-# include <paths.h>
+#include <paths.h>
 #include <pwd.h>
 #include <grp.h>
 #endif
diff --git a/monitor.c b/monitor.c
index 166f4d2c4..df9bde2e9 100644
--- a/monitor.c
+++ b/monitor.c
@@ -34,9 +34,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <limits.h>
-#ifdef HAVE_PATHS_H
 #include <paths.h>
-#endif
 #include <pwd.h>
 #include <signal.h>
 #include <stdint.h>
diff --git a/mux.c b/mux.c
index 103746a90..8ff29ee2a 100644
--- a/mux.c
+++ b/mux.c
@@ -34,9 +34,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
-#ifdef HAVE_PATHS_H
 #include <paths.h>
-#endif
 
 #include <poll.h>
 
diff --git a/readconf.c b/readconf.c
index ba25ba881..bee3e21c4 100644
--- a/readconf.c
+++ b/readconf.c
@@ -34,9 +34,7 @@
 #endif
 #include <limits.h>
 #include <netdb.h>
-#ifdef HAVE_PATHS_H
-# include <paths.h>
-#endif
+#include <paths.h>
 #include <pwd.h>
 #include <signal.h>
 #include <stdio.h>
diff --git a/readpass.c b/readpass.c
index 5a88824b4..3c9212c27 100644
--- a/readpass.c
+++ b/readpass.c
@@ -30,9 +30,7 @@
 
 #include <errno.h>
 #include <fcntl.h>
-#ifdef HAVE_PATHS_H
-# include <paths.h>
-#endif
+#include <paths.h>
 #include <signal.h>
 #include <stdarg.h>
 #include <stdio.h>
diff --git a/session.c b/session.c
index 7b030793a..6d1656428 100644
--- a/session.c
+++ b/session.c
@@ -50,9 +50,7 @@
 #include <fcntl.h>
 #include <grp.h>
 #include <netdb.h>
-#ifdef HAVE_PATHS_H
 #include <paths.h>
-#endif
 #include <pwd.h>
 #include <signal.h>
 #include <stdio.h>
diff --git a/sftp.c b/sftp.c
index 6e3cf7054..191b1e348 100644
--- a/sftp.c
+++ b/sftp.c
@@ -31,9 +31,7 @@
 #include <ctype.h>
 #include <errno.h>
 
-#ifdef HAVE_PATHS_H
-# include <paths.h>
-#endif
+#include <paths.h>
 #ifdef HAVE_LIBGEN_H
 #include <libgen.h>
 #endif
diff --git a/ssh-agent.c b/ssh-agent.c
index 3ea1a4d8d..e17d8aa9a 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -57,9 +57,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <limits.h>
-#ifdef HAVE_PATHS_H
-# include <paths.h>
-#endif
+#include <paths.h>
 #include <poll.h>
 #include <signal.h>
 #include <stdarg.h>
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 6803f3101..b57f05690 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -28,9 +28,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <netdb.h>
-#ifdef HAVE_PATHS_H
-# include <paths.h>
-#endif
+#include <paths.h>
 #include <pwd.h>
 #include <stdarg.h>
 #include <stdio.h>
diff --git a/ssh-keysign.c b/ssh-keysign.c
index 2410c6cd1..c2d8471ad 100644
--- a/ssh-keysign.c
+++ b/ssh-keysign.c
@@ -26,9 +26,7 @@
 #include "includes.h"
 
 #include <fcntl.h>
-#ifdef HAVE_PATHS_H
 #include <paths.h>
-#endif
 #include <pwd.h>
 #include <stdarg.h>
 #include <stdio.h>
diff --git a/ssh.c b/ssh.c
index 6bbb82874..93dbd2e5e 100644
--- a/ssh.c
+++ b/ssh.c
@@ -56,9 +56,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <netdb.h>
-#ifdef HAVE_PATHS_H
 #include <paths.h>
-#endif
 #include <pwd.h>
 #include <signal.h>
 #include <stdarg.h>
diff --git a/sshconnect.c b/sshconnect.c
index 8f8e960ec..79ccbcc6b 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -32,9 +32,7 @@
 #include <fcntl.h>
 #include <limits.h>
 #include <netdb.h>
-#ifdef HAVE_PATHS_H
 #include <paths.h>
-#endif
 #include <pwd.h>
 #include <poll.h>
 #include <signal.h>
diff --git a/sshd-auth.c b/sshd-auth.c
index 95520608c..27db2e14c 100644
--- a/sshd-auth.c
+++ b/sshd-auth.c
@@ -42,9 +42,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <netdb.h>
-#ifdef HAVE_PATHS_H
-# include <paths.h>
-#endif
+#include <paths.h>
 #include <pwd.h>
 #include <grp.h>
 #include <signal.h>
diff --git a/sshd-session.c b/sshd-session.c
index 6fc4aa086..cd23c0530 100644
--- a/sshd-session.c
+++ b/sshd-session.c
@@ -45,9 +45,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <netdb.h>
-#ifdef HAVE_PATHS_H
-# include <paths.h>
-#endif
+#include <paths.h>
 #include <pwd.h>
 #include <grp.h>
 #include <signal.h>
diff --git a/sshd.c b/sshd.c
index 60d0d1ff1..23ca4e4fb 100644
--- a/sshd.c
+++ b/sshd.c
@@ -43,9 +43,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <netdb.h>
-#ifdef HAVE_PATHS_H
 #include <paths.h>
-#endif
 #include <grp.h>
 #include <poll.h>
 #include <pwd.h>
diff --git a/sshpty.c b/sshpty.c
index 4867e7f5e..fe01f3b88 100644
--- a/sshpty.c
+++ b/sshpty.c
@@ -22,9 +22,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <grp.h>
-#ifdef HAVE_PATHS_H
-# include <paths.h>
-#endif
+#include <paths.h>
 #include <pwd.h>
 #include <stdarg.h>
 #include <stdio.h>

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


More information about the openssh-commits mailing list