From 28cb0a43091fe76517b457ad3c9c0d03d2a24e5c Mon Sep 17 00:00:00 2001 From: djm Date: Mon, 24 Jul 2006 04:51:00 +0000 Subject: [PATCH] - (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 --- ChangeLog | 13 +++++++++++++ acss.c | 3 +++ auth-krb5.c | 2 ++ auth-options.c | 4 +--- auth-pam.c | 11 ++++++++--- auth-shadow.c | 1 + canohost.c | 4 +--- channels.c | 4 +--- cipher-acss.c | 3 +++ defines.h | 5 ----- dns.c | 4 +--- gss-genr.c | 1 + gss-serv-krb5.c | 2 ++ gss-serv.c | 1 + log.h | 2 ++ loginrec.c | 2 ++ logintest.c | 4 +--- openbsd-compat/bindresvport.c | 1 + openbsd-compat/bsd-arc4random.c | 4 ++++ openbsd-compat/bsd-misc.c | 1 + openbsd-compat/getrrsetbyname.c | 2 ++ openbsd-compat/glob.c | 2 ++ openbsd-compat/mktemp.c | 1 + openbsd-compat/port-linux.c | 3 +++ openbsd-compat/port-tun.c | 2 ++ openbsd-compat/readpassphrase.c | 2 ++ openbsd-compat/setproctitle.c | 1 + openbsd-compat/xmmap.c | 2 ++ readconf.c | 4 +--- servconf.c | 4 +--- ssh-keygen.c | 4 +--- ssh-keyscan.c | 4 +--- ssh-keysign.c | 2 +- ssh-rand-helper.c | 2 ++ ssh.c | 4 +--- sshconnect.c | 4 +--- sshd.c | 4 +--- 37 files changed, 74 insertions(+), 45 deletions(-) diff --git a/ChangeLog b/ChangeLog index 57c3f5a7..4766d9ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -99,6 +99,19 @@ [auth.h dispatch.c kex.h sftp-client.c] #include for sig_atomic_t; need this prior to move + - (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 20060713 - (dtucker) [auth-krb5.c auth-pam.c] Still more errno.h diff --git a/acss.c b/acss.c index c46d28bb..37a07dd5 100644 --- a/acss.c +++ b/acss.c @@ -16,6 +16,9 @@ */ #include "includes.h" + +#include + #include #if !defined(EVP_CTRL_SET_ACSS_MODE) && (OPENSSL_VERSION_NUMBER >= 0x00906000L) diff --git a/auth-krb5.c b/auth-krb5.c index 8beacc0d..676b8ab1 100644 --- a/auth-krb5.c +++ b/auth-krb5.c @@ -41,6 +41,8 @@ #ifdef KRB5 #include +#include +#include #include extern ServerOptions options; diff --git a/auth-options.c b/auth-options.c index 33c62641..cd904967 100644 --- a/auth-options.c +++ b/auth-options.c @@ -14,9 +14,7 @@ #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #include #include diff --git a/auth-pam.c b/auth-pam.c index cb8754ec..6ce9db12 100644 --- a/auth-pam.c +++ b/auth-pam.c @@ -54,6 +54,8 @@ #include #include +#include +#include #ifdef USE_PAM #if defined(HAVE_SECURITY_PAM_APPL_H) @@ -152,14 +154,16 @@ sshpam_sigchld_handler(int sig) fatal("PAM: authentication thread exited uncleanly"); } +/* ARGSUSED */ static void -pthread_exit(void *value __unused) +pthread_exit(void *value) { _exit(0); } +/* ARGSUSED */ static int -pthread_create(sp_pthread_t *thread, const void *attr __unused, +pthread_create(sp_pthread_t *thread, const void *attr, void *(*thread_start)(void *), void *arg) { pid_t pid; @@ -191,8 +195,9 @@ pthread_cancel(sp_pthread_t thread) return (kill(thread, SIGTERM)); } +/* ARGSUSED */ static int -pthread_join(sp_pthread_t thread, void **value __unused) +pthread_join(sp_pthread_t thread, void **value) { int status; diff --git a/auth-shadow.c b/auth-shadow.c index c8d5dd3c..7cd69c21 100644 --- a/auth-shadow.c +++ b/auth-shadow.c @@ -26,6 +26,7 @@ #if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE) #include +#include #include "auth.h" #include "buffer.h" diff --git a/canohost.c b/canohost.c index 97b5a78f..b40cbf60 100644 --- a/canohost.c +++ b/canohost.c @@ -21,9 +21,7 @@ #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #include #include "packet.h" diff --git a/channels.c b/channels.c index 8cf4242f..895c43f6 100644 --- a/channels.c +++ b/channels.c @@ -50,9 +50,7 @@ #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #include #include #include diff --git a/cipher-acss.c b/cipher-acss.c index 90b51a4d..cb0bf736 100644 --- a/cipher-acss.c +++ b/cipher-acss.c @@ -15,8 +15,11 @@ */ #include "includes.h" + #include +#include + #if !defined(EVP_CTRL_SET_ACSS_MODE) && (OPENSSL_VERSION_NUMBER >= 0x00907000L) #include "acss.h" diff --git a/defines.h b/defines.h index cf1e1a2a..4c949746 100644 --- a/defines.h +++ b/defines.h @@ -143,16 +143,11 @@ including rpc/rpc.h breaks Solaris 6 #define INADDR_LOOPBACK ((u_long)0x7f000001) #endif -#ifndef __unused -#define __unused -#endif - /* Types */ /* If sys/types.h does not supply intXX_t, supply them ourselves */ /* (or die trying) */ - #ifndef HAVE_U_INT typedef unsigned int u_int; #endif diff --git a/dns.c b/dns.c index 5f123a2e..c9368b96 100644 --- a/dns.c +++ b/dns.c @@ -30,9 +30,7 @@ #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #include #include "xmalloc.h" diff --git a/gss-genr.c b/gss-genr.c index 0497657c..522fedab 100644 --- a/gss-genr.c +++ b/gss-genr.c @@ -29,6 +29,7 @@ #ifdef GSSAPI #include +#include #include "xmalloc.h" #include "bufaux.h" diff --git a/gss-serv-krb5.c b/gss-serv-krb5.c index eae29b2a..7b78cfe0 100644 --- a/gss-serv-krb5.c +++ b/gss-serv-krb5.c @@ -29,6 +29,8 @@ #ifdef GSSAPI #ifdef KRB5 +#include + #include "auth.h" #include "xmalloc.h" #include "log.h" diff --git a/gss-serv.c b/gss-serv.c index c033aad4..b5c5538f 100644 --- a/gss-serv.c +++ b/gss-serv.c @@ -29,6 +29,7 @@ #ifdef GSSAPI #include +#include #include "bufaux.h" #include "auth.h" diff --git a/log.h b/log.h index 9e1a2fcd..15ebc93b 100644 --- a/log.h +++ b/log.h @@ -15,6 +15,8 @@ #ifndef SSH_LOG_H #define SSH_LOG_H +#include "includes.h" + #include #include /* Needed for LOG_AUTHPRIV (if present) */ diff --git a/loginrec.c b/loginrec.c index 8299b79e..955d42e8 100644 --- a/loginrec.c +++ b/loginrec.c @@ -156,6 +156,8 @@ #include #include #include +#include +#include #include "ssh.h" #include "xmalloc.h" diff --git a/logintest.c b/logintest.c index 0de928be..7e9fbbfb 100644 --- a/logintest.c +++ b/logintest.c @@ -40,9 +40,7 @@ #include #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #ifdef HAVE_TIME_H #include #endif diff --git a/openbsd-compat/bindresvport.c b/openbsd-compat/bindresvport.c index 2c16233c..ef0eff3b 100644 --- a/openbsd-compat/bindresvport.c +++ b/openbsd-compat/bindresvport.c @@ -37,6 +37,7 @@ #include "includes.h" #include +#include #define STARTPORT 600 #define ENDPORT (IPPORT_RESERVED - 1) diff --git a/openbsd-compat/bsd-arc4random.c b/openbsd-compat/bsd-arc4random.c index 46e0a020..c1aecfe9 100644 --- a/openbsd-compat/bsd-arc4random.c +++ b/openbsd-compat/bsd-arc4random.c @@ -15,6 +15,10 @@ */ #include "includes.h" + +#include +#include + #include "log.h" #ifndef HAVE_ARC4RANDOM diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index d2d9ad77..e6128f9a 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c @@ -17,6 +17,7 @@ #include "includes.h" +#include #include #include "xmalloc.h" diff --git a/openbsd-compat/getrrsetbyname.c b/openbsd-compat/getrrsetbyname.c index a855ad6d..70ef1850 100644 --- a/openbsd-compat/getrrsetbyname.c +++ b/openbsd-compat/getrrsetbyname.c @@ -49,6 +49,8 @@ #ifndef HAVE_GETRRSETBYNAME +#include + #include "getrrsetbyname.h" #if defined(HAVE_DECL_H_ERRNO) && !HAVE_DECL_H_ERRNO diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c index bba4c097..b4873932 100644 --- a/openbsd-compat/glob.c +++ b/openbsd-compat/glob.c @@ -41,6 +41,8 @@ #include #include #include +#include +#include static long get_arg_max(void) diff --git a/openbsd-compat/mktemp.c b/openbsd-compat/mktemp.c index b8b0793a..2285c84d 100644 --- a/openbsd-compat/mktemp.c +++ b/openbsd-compat/mktemp.c @@ -41,6 +41,7 @@ #include #include #include +#include #if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP) diff --git a/openbsd-compat/port-linux.c b/openbsd-compat/port-linux.c index ecff797d..5dedbdc6 100644 --- a/openbsd-compat/port-linux.c +++ b/openbsd-compat/port-linux.c @@ -23,6 +23,9 @@ #include "includes.h" +#include +#include + #ifdef WITH_SELINUX #include "log.h" #include "port-linux.h" diff --git a/openbsd-compat/port-tun.c b/openbsd-compat/port-tun.c index 9806eec7..f6a6aa9e 100644 --- a/openbsd-compat/port-tun.c +++ b/openbsd-compat/port-tun.c @@ -23,6 +23,8 @@ #include #include +#include +#include #include "log.h" #include "misc.h" diff --git a/openbsd-compat/readpassphrase.c b/openbsd-compat/readpassphrase.c index fd9731ac..11bd8f64 100644 --- a/openbsd-compat/readpassphrase.c +++ b/openbsd-compat/readpassphrase.c @@ -32,6 +32,8 @@ #include #include #include +#include +#include #ifdef TCSASOFT # define _T_FLUSH (TCSAFLUSH|TCSASOFT) diff --git a/openbsd-compat/setproctitle.c b/openbsd-compat/setproctitle.c index 32e987de..7fec73f8 100644 --- a/openbsd-compat/setproctitle.c +++ b/openbsd-compat/setproctitle.c @@ -40,6 +40,7 @@ #ifdef HAVE_SYS_PSTAT_H #include #endif +#include #define SPT_NONE 0 /* don't use it at all */ #define SPT_PSTAT 1 /* use pstat(PSTAT_SETCMD, ...) */ diff --git a/openbsd-compat/xmmap.c b/openbsd-compat/xmmap.c index 78ef46b2..5b62990b 100644 --- a/openbsd-compat/xmmap.c +++ b/openbsd-compat/xmmap.c @@ -34,6 +34,8 @@ #include #include +#include +#include #include "log.h" diff --git a/readconf.c b/readconf.c index 432b80ed..6fe37279 100644 --- a/readconf.c +++ b/readconf.c @@ -22,9 +22,7 @@ #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #include #include diff --git a/servconf.c b/servconf.c index ce44b5f6..dca9508a 100644 --- a/servconf.c +++ b/servconf.c @@ -15,9 +15,7 @@ #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #include #include diff --git a/ssh-keygen.c b/ssh-keygen.c index f2d37129..17236a55 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -23,9 +23,7 @@ #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #ifdef HAVE_PATHS_H # include #endif diff --git a/ssh-keyscan.c b/ssh-keyscan.c index 30df7516..6b706f0a 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -14,9 +14,7 @@ #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #include #include #include diff --git a/ssh-keysign.c b/ssh-keysign.c index 435b839f..89b8e434 100644 --- a/ssh-keysign.c +++ b/ssh-keysign.c @@ -148,7 +148,7 @@ main(int argc, char **argv) { Buffer b; Options options; - Key *keys[2], *key; + Key *keys[2], *key = NULL; struct passwd *pw; int key_fd[2], i, found, version = 2, fd; u_char *signature, *data; diff --git a/ssh-rand-helper.c b/ssh-rand-helper.c index fb6fc281..121fa52f 100644 --- a/ssh-rand-helper.c +++ b/ssh-rand-helper.c @@ -41,6 +41,8 @@ #include #include #include +#include +#include #include #include diff --git a/ssh.c b/ssh.c index d0d9457c..df787e45 100644 --- a/ssh.c +++ b/ssh.c @@ -54,9 +54,7 @@ #include #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #ifdef HAVE_PATHS_H #include #endif diff --git a/sshconnect.c b/sshconnect.c index f33cf52b..21c5203c 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -24,9 +24,7 @@ #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #ifdef HAVE_PATHS_H #include #endif diff --git a/sshd.c b/sshd.c index 6428f42a..cc1ebd8d 100644 --- a/sshd.c +++ b/sshd.c @@ -54,9 +54,7 @@ #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #ifdef HAVE_PATHS_H #include #endif -- 2.45.1