summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-07-24 14:51:00 +1000
committerDamien Miller <djm@mindrot.org>2006-07-24 14:51:00 +1000
commitb8fe89c4d97ea9a5d7efb2c60108b8a7644f6a49 (patch)
tree60e9457b39b992a0bf19488f5e92d57d35b6fdb5
parentd8337c5e609b3bafda0008aef2636d6f17c622ef (diff)
- (djm) [acss.c auth-krb5.c auth-options.c auth-pam.c auth-shadow.c]
[canohost.c channels.c cipher-acss.c defines.h dns.c gss-genr.c] [gss-serv-krb5.c gss-serv.c log.h loginrec.c logintest.c readconf.c] [servconf.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh-rand-helper.c] [ssh.c sshconnect.c sshd.c openbsd-compat/bindresvport.c] [openbsd-compat/bsd-arc4random.c openbsd-compat/bsd-misc.c] [openbsd-compat/getrrsetbyname.c openbsd-compat/glob.c] [openbsd-compat/mktemp.c openbsd-compat/port-linux.c] [openbsd-compat/port-tun.c openbsd-compat/readpassphrase.c] [openbsd-compat/setproctitle.c openbsd-compat/xmmap.c] make the portable tree compile again - sprinkle unistd.h and string.h back in. Don't redefine __unused, as it turned out to be used in headers on Linux, and replace its use in auth-pam.c with ARGSUSED
-rw-r--r--ChangeLog15
-rw-r--r--acss.c5
-rw-r--r--auth-krb5.c2
-rw-r--r--auth-options.c4
-rw-r--r--auth-pam.c11
-rw-r--r--auth-shadow.c1
-rw-r--r--canohost.c4
-rw-r--r--channels.c4
-rw-r--r--cipher-acss.c3
-rw-r--r--defines.h7
-rw-r--r--dns.c4
-rw-r--r--gss-genr.c1
-rw-r--r--gss-serv-krb5.c2
-rw-r--r--gss-serv.c1
-rw-r--r--log.h2
-rw-r--r--loginrec.c2
-rw-r--r--logintest.c4
-rw-r--r--openbsd-compat/bindresvport.c1
-rw-r--r--openbsd-compat/bsd-arc4random.c4
-rw-r--r--openbsd-compat/bsd-misc.c1
-rw-r--r--openbsd-compat/getrrsetbyname.c2
-rw-r--r--openbsd-compat/glob.c2
-rw-r--r--openbsd-compat/mktemp.c1
-rw-r--r--openbsd-compat/port-linux.c5
-rw-r--r--openbsd-compat/port-tun.c2
-rw-r--r--openbsd-compat/readpassphrase.c2
-rw-r--r--openbsd-compat/setproctitle.c1
-rw-r--r--openbsd-compat/xmmap.c4
-rw-r--r--readconf.c4
-rw-r--r--servconf.c4
-rw-r--r--ssh-keygen.c4
-rw-r--r--ssh-keyscan.c4
-rw-r--r--ssh-keysign.c2
-rw-r--r--ssh-rand-helper.c2
-rw-r--r--ssh.c4
-rw-r--r--sshconnect.c4
-rw-r--r--sshd.c4
37 files changed, 79 insertions, 50 deletions
diff --git a/ChangeLog b/ChangeLog
index 7f7679402..d2cd9b597 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -99,6 +99,19 @@
99 [auth.h dispatch.c kex.h sftp-client.c] 99 [auth.h dispatch.c kex.h sftp-client.c]
100 #include <signal.h> for sig_atomic_t; need this prior to <sys/param.h> 100 #include <signal.h> for sig_atomic_t; need this prior to <sys/param.h>
101 move 101 move
102 - (djm) [acss.c auth-krb5.c auth-options.c auth-pam.c auth-shadow.c]
103 [canohost.c channels.c cipher-acss.c defines.h dns.c gss-genr.c]
104 [gss-serv-krb5.c gss-serv.c log.h loginrec.c logintest.c readconf.c]
105 [servconf.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh-rand-helper.c]
106 [ssh.c sshconnect.c sshd.c openbsd-compat/bindresvport.c]
107 [openbsd-compat/bsd-arc4random.c openbsd-compat/bsd-misc.c]
108 [openbsd-compat/getrrsetbyname.c openbsd-compat/glob.c]
109 [openbsd-compat/mktemp.c openbsd-compat/port-linux.c]
110 [openbsd-compat/port-tun.c openbsd-compat/readpassphrase.c]
111 [openbsd-compat/setproctitle.c openbsd-compat/xmmap.c]
112 make the portable tree compile again - sprinkle unistd.h and string.h
113 back in. Don't redefine __unused, as it turned out to be used in
114 headers on Linux, and replace its use in auth-pam.c with ARGSUSED
102 115
10320060713 11620060713
104 - (dtucker) [auth-krb5.c auth-pam.c] Still more errno.h 117 - (dtucker) [auth-krb5.c auth-pam.c] Still more errno.h
@@ -5017,4 +5030,4 @@
5017 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 5030 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
5018 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 5031 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
5019 5032
5020$Id: ChangeLog,v 1.4429 2006/07/24 04:14:19 djm Exp $ 5033$Id: ChangeLog,v 1.4430 2006/07/24 04:51:00 djm Exp $
diff --git a/acss.c b/acss.c
index 99efde071..86e2c01a8 100644
--- a/acss.c
+++ b/acss.c
@@ -1,4 +1,4 @@
1/* $Id: acss.c,v 1.3 2005/07/17 07:04:47 djm Exp $ */ 1/* $Id: acss.c,v 1.4 2006/07/24 04:51:01 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2004 The OpenBSD project 3 * Copyright (c) 2004 The OpenBSD project
4 * 4 *
@@ -16,6 +16,9 @@
16 */ 16 */
17 17
18#include "includes.h" 18#include "includes.h"
19
20#include <string.h>
21
19#include <openssl/evp.h> 22#include <openssl/evp.h>
20 23
21#if !defined(EVP_CTRL_SET_ACSS_MODE) && (OPENSSL_VERSION_NUMBER >= 0x00906000L) 24#if !defined(EVP_CTRL_SET_ACSS_MODE) && (OPENSSL_VERSION_NUMBER >= 0x00906000L)
diff --git a/auth-krb5.c b/auth-krb5.c
index 8beacc0d4..676b8ab1f 100644
--- a/auth-krb5.c
+++ b/auth-krb5.c
@@ -41,6 +41,8 @@
41 41
42#ifdef KRB5 42#ifdef KRB5
43#include <errno.h> 43#include <errno.h>
44#include <unistd.h>
45#include <string.h>
44#include <krb5.h> 46#include <krb5.h>
45 47
46extern ServerOptions options; 48extern ServerOptions options;
diff --git a/auth-options.c b/auth-options.c
index 33c62641b..cd904967a 100644
--- a/auth-options.c
+++ b/auth-options.c
@@ -14,9 +14,7 @@
14 14
15#include <sys/types.h> 15#include <sys/types.h>
16 16
17#if defined(HAVE_NETDB_H) 17#include <netdb.h>
18# include <netdb.h>
19#endif
20#include <pwd.h> 18#include <pwd.h>
21#include <string.h> 19#include <string.h>
22 20
diff --git a/auth-pam.c b/auth-pam.c
index cb8754ec7..6ce9db12b 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -54,6 +54,8 @@
54 54
55#include <errno.h> 55#include <errno.h>
56#include <signal.h> 56#include <signal.h>
57#include <string.h>
58#include <unistd.h>
57 59
58#ifdef USE_PAM 60#ifdef USE_PAM
59#if defined(HAVE_SECURITY_PAM_APPL_H) 61#if defined(HAVE_SECURITY_PAM_APPL_H)
@@ -152,14 +154,16 @@ sshpam_sigchld_handler(int sig)
152 fatal("PAM: authentication thread exited uncleanly"); 154 fatal("PAM: authentication thread exited uncleanly");
153} 155}
154 156
157/* ARGSUSED */
155static void 158static void
156pthread_exit(void *value __unused) 159pthread_exit(void *value)
157{ 160{
158 _exit(0); 161 _exit(0);
159} 162}
160 163
164/* ARGSUSED */
161static int 165static int
162pthread_create(sp_pthread_t *thread, const void *attr __unused, 166pthread_create(sp_pthread_t *thread, const void *attr,
163 void *(*thread_start)(void *), void *arg) 167 void *(*thread_start)(void *), void *arg)
164{ 168{
165 pid_t pid; 169 pid_t pid;
@@ -191,8 +195,9 @@ pthread_cancel(sp_pthread_t thread)
191 return (kill(thread, SIGTERM)); 195 return (kill(thread, SIGTERM));
192} 196}
193 197
198/* ARGSUSED */
194static int 199static int
195pthread_join(sp_pthread_t thread, void **value __unused) 200pthread_join(sp_pthread_t thread, void **value)
196{ 201{
197 int status; 202 int status;
198 203
diff --git a/auth-shadow.c b/auth-shadow.c
index c8d5dd3c1..7cd69c21f 100644
--- a/auth-shadow.c
+++ b/auth-shadow.c
@@ -26,6 +26,7 @@
26 26
27#if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE) 27#if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE)
28#include <shadow.h> 28#include <shadow.h>
29#include <string.h>
29 30
30#include "auth.h" 31#include "auth.h"
31#include "buffer.h" 32#include "buffer.h"
diff --git a/canohost.c b/canohost.c
index 97b5a78f9..b40cbf603 100644
--- a/canohost.c
+++ b/canohost.c
@@ -21,9 +21,7 @@
21 21
22#include <ctype.h> 22#include <ctype.h>
23#include <errno.h> 23#include <errno.h>
24#if defined(HAVE_NETDB_H) 24#include <netdb.h>
25# include <netdb.h>
26#endif
27#include <string.h> 25#include <string.h>
28 26
29#include "packet.h" 27#include "packet.h"
diff --git a/channels.c b/channels.c
index 8cf4242fe..895c43f6a 100644
--- a/channels.c
+++ b/channels.c
@@ -50,9 +50,7 @@
50#include <arpa/inet.h> 50#include <arpa/inet.h>
51 51
52#include <errno.h> 52#include <errno.h>
53#if defined(HAVE_NETDB_H) 53#include <netdb.h>
54# include <netdb.h>
55#endif
56#include <string.h> 54#include <string.h>
57#include <termios.h> 55#include <termios.h>
58#include <unistd.h> 56#include <unistd.h>
diff --git a/cipher-acss.c b/cipher-acss.c
index 90b51a4d1..cb0bf736c 100644
--- a/cipher-acss.c
+++ b/cipher-acss.c
@@ -15,8 +15,11 @@
15 */ 15 */
16 16
17#include "includes.h" 17#include "includes.h"
18
18#include <openssl/evp.h> 19#include <openssl/evp.h>
19 20
21#include <string.h>
22
20#if !defined(EVP_CTRL_SET_ACSS_MODE) && (OPENSSL_VERSION_NUMBER >= 0x00907000L) 23#if !defined(EVP_CTRL_SET_ACSS_MODE) && (OPENSSL_VERSION_NUMBER >= 0x00907000L)
21 24
22#include "acss.h" 25#include "acss.h"
diff --git a/defines.h b/defines.h
index 4dccc9172..7b0a302a5 100644
--- a/defines.h
+++ b/defines.h
@@ -25,7 +25,7 @@
25#ifndef _DEFINES_H 25#ifndef _DEFINES_H
26#define _DEFINES_H 26#define _DEFINES_H
27 27
28/* $Id: defines.h,v 1.133 2006/07/12 04:14:31 dtucker Exp $ */ 28/* $Id: defines.h,v 1.134 2006/07/24 04:51:01 djm Exp $ */
29 29
30 30
31/* Constants */ 31/* Constants */
@@ -143,16 +143,11 @@ including rpc/rpc.h breaks Solaris 6
143#define INADDR_LOOPBACK ((u_long)0x7f000001) 143#define INADDR_LOOPBACK ((u_long)0x7f000001)
144#endif 144#endif
145 145
146#ifndef __unused
147#define __unused
148#endif
149
150/* Types */ 146/* Types */
151 147
152/* If sys/types.h does not supply intXX_t, supply them ourselves */ 148/* If sys/types.h does not supply intXX_t, supply them ourselves */
153/* (or die trying) */ 149/* (or die trying) */
154 150
155
156#ifndef HAVE_U_INT 151#ifndef HAVE_U_INT
157typedef unsigned int u_int; 152typedef unsigned int u_int;
158#endif 153#endif
diff --git a/dns.c b/dns.c
index 5f123a2ee..c9368b96b 100644
--- a/dns.c
+++ b/dns.c
@@ -30,9 +30,7 @@
30#include <sys/types.h> 30#include <sys/types.h>
31#include <sys/socket.h> 31#include <sys/socket.h>
32 32
33#if defined(HAVE_NETDB_H) 33#include <netdb.h>
34# include <netdb.h>
35#endif
36#include <string.h> 34#include <string.h>
37 35
38#include "xmalloc.h" 36#include "xmalloc.h"
diff --git a/gss-genr.c b/gss-genr.c
index 0497657c0..522fedab3 100644
--- a/gss-genr.c
+++ b/gss-genr.c
@@ -29,6 +29,7 @@
29#ifdef GSSAPI 29#ifdef GSSAPI
30 30
31#include <string.h> 31#include <string.h>
32#include <unistd.h>
32 33
33#include "xmalloc.h" 34#include "xmalloc.h"
34#include "bufaux.h" 35#include "bufaux.h"
diff --git a/gss-serv-krb5.c b/gss-serv-krb5.c
index eae29b2ae..7b78cfe0a 100644
--- a/gss-serv-krb5.c
+++ b/gss-serv-krb5.c
@@ -29,6 +29,8 @@
29#ifdef GSSAPI 29#ifdef GSSAPI
30#ifdef KRB5 30#ifdef KRB5
31 31
32#include <string.h>
33
32#include "auth.h" 34#include "auth.h"
33#include "xmalloc.h" 35#include "xmalloc.h"
34#include "log.h" 36#include "log.h"
diff --git a/gss-serv.c b/gss-serv.c
index c033aad4f..b5c5538fe 100644
--- a/gss-serv.c
+++ b/gss-serv.c
@@ -29,6 +29,7 @@
29#ifdef GSSAPI 29#ifdef GSSAPI
30 30
31#include <string.h> 31#include <string.h>
32#include <unistd.h>
32 33
33#include "bufaux.h" 34#include "bufaux.h"
34#include "auth.h" 35#include "auth.h"
diff --git a/log.h b/log.h
index 9e1a2fcdb..15ebc93b5 100644
--- a/log.h
+++ b/log.h
@@ -15,6 +15,8 @@
15#ifndef SSH_LOG_H 15#ifndef SSH_LOG_H
16#define SSH_LOG_H 16#define SSH_LOG_H
17 17
18#include "includes.h"
19
18#include <stdarg.h> 20#include <stdarg.h>
19 21
20#include <syslog.h> /* Needed for LOG_AUTHPRIV (if present) */ 22#include <syslog.h> /* Needed for LOG_AUTHPRIV (if present) */
diff --git a/loginrec.c b/loginrec.c
index 8299b79e4..955d42e8f 100644
--- a/loginrec.c
+++ b/loginrec.c
@@ -156,6 +156,8 @@
156#include <errno.h> 156#include <errno.h>
157#include <fcntl.h> 157#include <fcntl.h>
158#include <pwd.h> 158#include <pwd.h>
159#include <string.h>
160#include <unistd.h>
159 161
160#include "ssh.h" 162#include "ssh.h"
161#include "xmalloc.h" 163#include "xmalloc.h"
diff --git a/logintest.c b/logintest.c
index 0de928bec..7e9fbbfbb 100644
--- a/logintest.c
+++ b/logintest.c
@@ -40,9 +40,7 @@
40#include <stdio.h> 40#include <stdio.h>
41#include <string.h> 41#include <string.h>
42#include <pwd.h> 42#include <pwd.h>
43#if defined(HAVE_NETDB_H) 43#include <netdb.h>
44# include <netdb.h>
45#endif
46#ifdef HAVE_TIME_H 44#ifdef HAVE_TIME_H
47#include <time.h> 45#include <time.h>
48#endif 46#endif
diff --git a/openbsd-compat/bindresvport.c b/openbsd-compat/bindresvport.c
index 2c16233c9..ef0eff3b6 100644
--- a/openbsd-compat/bindresvport.c
+++ b/openbsd-compat/bindresvport.c
@@ -37,6 +37,7 @@
37#include "includes.h" 37#include "includes.h"
38 38
39#include <errno.h> 39#include <errno.h>
40#include <string.h>
40 41
41#define STARTPORT 600 42#define STARTPORT 600
42#define ENDPORT (IPPORT_RESERVED - 1) 43#define ENDPORT (IPPORT_RESERVED - 1)
diff --git a/openbsd-compat/bsd-arc4random.c b/openbsd-compat/bsd-arc4random.c
index 46e0a020f..c1aecfe99 100644
--- a/openbsd-compat/bsd-arc4random.c
+++ b/openbsd-compat/bsd-arc4random.c
@@ -15,6 +15,10 @@
15 */ 15 */
16 16
17#include "includes.h" 17#include "includes.h"
18
19#include <sys/types.h>
20#include <string.h>
21
18#include "log.h" 22#include "log.h"
19 23
20#ifndef HAVE_ARC4RANDOM 24#ifndef HAVE_ARC4RANDOM
diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c
index d2d9ad771..e6128f9a7 100644
--- a/openbsd-compat/bsd-misc.c
+++ b/openbsd-compat/bsd-misc.c
@@ -17,6 +17,7 @@
17 17
18#include "includes.h" 18#include "includes.h"
19 19
20#include <string.h>
20#include <signal.h> 21#include <signal.h>
21 22
22#include "xmalloc.h" 23#include "xmalloc.h"
diff --git a/openbsd-compat/getrrsetbyname.c b/openbsd-compat/getrrsetbyname.c
index a855ad6d5..70ef1850d 100644
--- a/openbsd-compat/getrrsetbyname.c
+++ b/openbsd-compat/getrrsetbyname.c
@@ -49,6 +49,8 @@
49 49
50#ifndef HAVE_GETRRSETBYNAME 50#ifndef HAVE_GETRRSETBYNAME
51 51
52#include <string.h>
53
52#include "getrrsetbyname.h" 54#include "getrrsetbyname.h"
53 55
54#if defined(HAVE_DECL_H_ERRNO) && !HAVE_DECL_H_ERRNO 56#if defined(HAVE_DECL_H_ERRNO) && !HAVE_DECL_H_ERRNO
diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c
index bba4c0976..b4873932a 100644
--- a/openbsd-compat/glob.c
+++ b/openbsd-compat/glob.c
@@ -41,6 +41,8 @@
41#include <ctype.h> 41#include <ctype.h>
42#include <errno.h> 42#include <errno.h>
43#include <pwd.h> 43#include <pwd.h>
44#include <string.h>
45#include <unistd.h>
44 46
45static long 47static long
46get_arg_max(void) 48get_arg_max(void)
diff --git a/openbsd-compat/mktemp.c b/openbsd-compat/mktemp.c
index b8b0793a6..2285c84df 100644
--- a/openbsd-compat/mktemp.c
+++ b/openbsd-compat/mktemp.c
@@ -41,6 +41,7 @@
41#include <fcntl.h> 41#include <fcntl.h>
42#include <ctype.h> 42#include <ctype.h>
43#include <errno.h> 43#include <errno.h>
44#include <unistd.h>
44 45
45#if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP) 46#if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP)
46 47
diff --git a/openbsd-compat/port-linux.c b/openbsd-compat/port-linux.c
index 54ec2910e..5e2e878dc 100644
--- a/openbsd-compat/port-linux.c
+++ b/openbsd-compat/port-linux.c
@@ -1,4 +1,4 @@
1/* $Id: port-linux.c,v 1.1 2006/04/22 11:26:08 djm Exp $ */ 1/* $Id: port-linux.c,v 1.2 2006/07/24 04:51:01 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2005 Daniel Walsh <dwalsh@redhat.com> 4 * Copyright (c) 2005 Daniel Walsh <dwalsh@redhat.com>
@@ -23,6 +23,9 @@
23 23
24#include "includes.h" 24#include "includes.h"
25 25
26#include <errno.h>
27#include <string.h>
28
26#ifdef WITH_SELINUX 29#ifdef WITH_SELINUX
27#include "log.h" 30#include "log.h"
28#include "port-linux.h" 31#include "port-linux.h"
diff --git a/openbsd-compat/port-tun.c b/openbsd-compat/port-tun.c
index 9806eec7d..f6a6aa9e1 100644
--- a/openbsd-compat/port-tun.c
+++ b/openbsd-compat/port-tun.c
@@ -23,6 +23,8 @@
23 23
24#include <errno.h> 24#include <errno.h>
25#include <fcntl.h> 25#include <fcntl.h>
26#include <string.h>
27#include <unistd.h>
26 28
27#include "log.h" 29#include "log.h"
28#include "misc.h" 30#include "misc.h"
diff --git a/openbsd-compat/readpassphrase.c b/openbsd-compat/readpassphrase.c
index fd9731ac6..11bd8f646 100644
--- a/openbsd-compat/readpassphrase.c
+++ b/openbsd-compat/readpassphrase.c
@@ -32,6 +32,8 @@
32#include <fcntl.h> 32#include <fcntl.h>
33#include <readpassphrase.h> 33#include <readpassphrase.h>
34#include <errno.h> 34#include <errno.h>
35#include <string.h>
36#include <unistd.h>
35 37
36#ifdef TCSASOFT 38#ifdef TCSASOFT
37# define _T_FLUSH (TCSAFLUSH|TCSASOFT) 39# define _T_FLUSH (TCSAFLUSH|TCSASOFT)
diff --git a/openbsd-compat/setproctitle.c b/openbsd-compat/setproctitle.c
index 32e987deb..7fec73f89 100644
--- a/openbsd-compat/setproctitle.c
+++ b/openbsd-compat/setproctitle.c
@@ -40,6 +40,7 @@
40#ifdef HAVE_SYS_PSTAT_H 40#ifdef HAVE_SYS_PSTAT_H
41#include <sys/pstat.h> 41#include <sys/pstat.h>
42#endif 42#endif
43#include <string.h>
43 44
44#define SPT_NONE 0 /* don't use it at all */ 45#define SPT_NONE 0 /* don't use it at all */
45#define SPT_PSTAT 1 /* use pstat(PSTAT_SETCMD, ...) */ 46#define SPT_PSTAT 1 /* use pstat(PSTAT_SETCMD, ...) */
diff --git a/openbsd-compat/xmmap.c b/openbsd-compat/xmmap.c
index 7d5cc812c..1293dcab0 100644
--- a/openbsd-compat/xmmap.c
+++ b/openbsd-compat/xmmap.c
@@ -23,7 +23,7 @@
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26/* $Id: xmmap.c,v 1.8 2006/07/12 12:35:52 dtucker Exp $ */ 26/* $Id: xmmap.c,v 1.9 2006/07/24 04:51:01 djm Exp $ */
27 27
28#include "includes.h" 28#include "includes.h"
29 29
@@ -34,6 +34,8 @@
34#include <sys/stat.h> 34#include <sys/stat.h>
35 35
36#include <errno.h> 36#include <errno.h>
37#include <string.h>
38#include <unistd.h>
37 39
38#include "log.h" 40#include "log.h"
39 41
diff --git a/readconf.c b/readconf.c
index 432b80ed0..6fe372796 100644
--- a/readconf.c
+++ b/readconf.c
@@ -22,9 +22,7 @@
22 22
23#include <ctype.h> 23#include <ctype.h>
24#include <errno.h> 24#include <errno.h>
25#if defined(HAVE_NETDB_H) 25#include <netdb.h>
26# include <netdb.h>
27#endif
28#include <string.h> 26#include <string.h>
29#include <unistd.h> 27#include <unistd.h>
30 28
diff --git a/servconf.c b/servconf.c
index ce44b5f60..dca9508ab 100644
--- a/servconf.c
+++ b/servconf.c
@@ -15,9 +15,7 @@
15#include <sys/types.h> 15#include <sys/types.h>
16#include <sys/socket.h> 16#include <sys/socket.h>
17 17
18#if defined(HAVE_NETDB_H) 18#include <netdb.h>
19# include <netdb.h>
20#endif
21#include <string.h> 19#include <string.h>
22#include <unistd.h> 20#include <unistd.h>
23 21
diff --git a/ssh-keygen.c b/ssh-keygen.c
index f2d37129b..17236a55a 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -23,9 +23,7 @@
23 23
24#include <errno.h> 24#include <errno.h>
25#include <fcntl.h> 25#include <fcntl.h>
26#if defined(HAVE_NETDB_H) 26#include <netdb.h>
27# include <netdb.h>
28#endif
29#ifdef HAVE_PATHS_H 27#ifdef HAVE_PATHS_H
30# include <paths.h> 28# include <paths.h>
31#endif 29#endif
diff --git a/ssh-keyscan.c b/ssh-keyscan.c
index 30df75166..6b706f0af 100644
--- a/ssh-keyscan.c
+++ b/ssh-keyscan.c
@@ -14,9 +14,7 @@
14 14
15#include <openssl/bn.h> 15#include <openssl/bn.h>
16 16
17#if defined(HAVE_NETDB_H) 17#include <netdb.h>
18# include <netdb.h>
19#endif
20#include <errno.h> 18#include <errno.h>
21#include <stdarg.h> 19#include <stdarg.h>
22#include <setjmp.h> 20#include <setjmp.h>
diff --git a/ssh-keysign.c b/ssh-keysign.c
index 435b839fa..89b8e4342 100644
--- a/ssh-keysign.c
+++ b/ssh-keysign.c
@@ -148,7 +148,7 @@ main(int argc, char **argv)
148{ 148{
149 Buffer b; 149 Buffer b;
150 Options options; 150 Options options;
151 Key *keys[2], *key; 151 Key *keys[2], *key = NULL;
152 struct passwd *pw; 152 struct passwd *pw;
153 int key_fd[2], i, found, version = 2, fd; 153 int key_fd[2], i, found, version = 2, fd;
154 u_char *signature, *data; 154 u_char *signature, *data;
diff --git a/ssh-rand-helper.c b/ssh-rand-helper.c
index fb6fc2814..121fa52fa 100644
--- a/ssh-rand-helper.c
+++ b/ssh-rand-helper.c
@@ -41,6 +41,8 @@
41#include <fcntl.h> 41#include <fcntl.h>
42#include <pwd.h> 42#include <pwd.h>
43#include <signal.h> 43#include <signal.h>
44#include <time.h>
45#include <unistd.h>
44 46
45#include <openssl/rand.h> 47#include <openssl/rand.h>
46#include <openssl/sha.h> 48#include <openssl/sha.h>
diff --git a/ssh.c b/ssh.c
index d0d9457c2..df787e45f 100644
--- a/ssh.c
+++ b/ssh.c
@@ -54,9 +54,7 @@
54#include <ctype.h> 54#include <ctype.h>
55#include <errno.h> 55#include <errno.h>
56#include <fcntl.h> 56#include <fcntl.h>
57#if defined(HAVE_NETDB_H) 57#include <netdb.h>
58# include <netdb.h>
59#endif
60#ifdef HAVE_PATHS_H 58#ifdef HAVE_PATHS_H
61#include <paths.h> 59#include <paths.h>
62#endif 60#endif
diff --git a/sshconnect.c b/sshconnect.c
index f33cf52b1..21c5203c6 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -24,9 +24,7 @@
24 24
25#include <ctype.h> 25#include <ctype.h>
26#include <errno.h> 26#include <errno.h>
27#if defined(HAVE_NETDB_H) 27#include <netdb.h>
28# include <netdb.h>
29#endif
30#ifdef HAVE_PATHS_H 28#ifdef HAVE_PATHS_H
31#include <paths.h> 29#include <paths.h>
32#endif 30#endif
diff --git a/sshd.c b/sshd.c
index 6428f42a0..cc1ebd8d9 100644
--- a/sshd.c
+++ b/sshd.c
@@ -54,9 +54,7 @@
54 54
55#include <errno.h> 55#include <errno.h>
56#include <fcntl.h> 56#include <fcntl.h>
57#if defined(HAVE_NETDB_H) 57#include <netdb.h>
58# include <netdb.h>
59#endif
60#ifdef HAVE_PATHS_H 58#ifdef HAVE_PATHS_H
61#include <paths.h> 59#include <paths.h>
62#endif 60#endif