diff options
author | Damien Miller <djm@mindrot.org> | 2000-01-19 13:45:07 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-01-19 13:45:07 +1100 |
commit | eaf9994f7e5fdddb7ded0cd9d757921ed8a9dc67 (patch) | |
tree | 02a3f73ffe6445cbb7f851eac17e607bc2d3a26a | |
parent | 9550a24e0198bde53d4d4404ed16b7b8957a7ada (diff) |
- SCO compile fixes from Gary E. Miller <gem@rellim.com>
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | bsd-rresvport.c | 8 | ||||
-rw-r--r-- | configure.in | 4 | ||||
-rw-r--r-- | includes.h | 3 | ||||
-rw-r--r-- | sshconnect.c | 12 |
5 files changed, 16 insertions, 12 deletions
@@ -1,4 +1,5 @@ | |||
1 | 20000119 | 1 | 20000119 |
2 | - SCO compile fixes from Gary E. Miller <gem@rellim.com> | ||
2 | - Compile fix from Darren_Hall@progressive.com | 3 | - Compile fix from Darren_Hall@progressive.com |
3 | 4 | ||
4 | 20000118 | 5 | 20000118 |
diff --git a/bsd-rresvport.c b/bsd-rresvport.c index c29165faa..99c150e06 100644 --- a/bsd-rresvport.c +++ b/bsd-rresvport.c | |||
@@ -61,18 +61,18 @@ rresvport_af(alport, af) | |||
61 | struct sockaddr *sa; | 61 | struct sockaddr *sa; |
62 | u_int16_t *portp; | 62 | u_int16_t *portp; |
63 | int s; | 63 | int s; |
64 | int sa_len; | 64 | int salen; |
65 | 65 | ||
66 | bzero(&ss, sizeof ss); | 66 | bzero(&ss, sizeof ss); |
67 | sa = (struct sockaddr *)&ss; | 67 | sa = (struct sockaddr *)&ss; |
68 | 68 | ||
69 | switch (af) { | 69 | switch (af) { |
70 | case AF_INET: | 70 | case AF_INET: |
71 | sa_len = sizeof(struct sockaddr_in); | 71 | salen = sizeof(struct sockaddr_in); |
72 | portp = &((struct sockaddr_in *)sa)->sin_port; | 72 | portp = &((struct sockaddr_in *)sa)->sin_port; |
73 | break; | 73 | break; |
74 | case AF_INET6: | 74 | case AF_INET6: |
75 | sa_len = sizeof(struct sockaddr_in6); | 75 | salen = sizeof(struct sockaddr_in6); |
76 | portp = &((struct sockaddr_in6 *)sa)->sin6_port; | 76 | portp = &((struct sockaddr_in6 *)sa)->sin6_port; |
77 | break; | 77 | break; |
78 | default: | 78 | default: |
@@ -87,7 +87,7 @@ rresvport_af(alport, af) | |||
87 | 87 | ||
88 | *portp = htons(*alport); | 88 | *portp = htons(*alport); |
89 | if (*alport < IPPORT_RESERVED - 1) { | 89 | if (*alport < IPPORT_RESERVED - 1) { |
90 | if (bind(s, sa, sa_len) >= 0) | 90 | if (bind(s, sa, salen) >= 0) |
91 | return (s); | 91 | return (s); |
92 | if (errno != EADDRINUSE) { | 92 | if (errno != EADDRINUSE) { |
93 | (void)close(s); | 93 | (void)close(s); |
diff --git a/configure.in b/configure.in index a5da0db93..d11c519df 100644 --- a/configure.in +++ b/configure.in | |||
@@ -141,7 +141,7 @@ if test -z "$no_libnsl" ; then | |||
141 | fi | 141 | fi |
142 | 142 | ||
143 | dnl Checks for header files. | 143 | dnl Checks for header files. |
144 | AC_CHECK_HEADERS(bstring.h endian.h lastlog.h login.h maillock.h netdb.h netgroup.h paths.h poll.h pty.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/select.h sys/stropts.h sys/time.h sys/ttcompat.h util.h utmp.h utmpx.h) | 144 | AC_CHECK_HEADERS(bstring.h endian.h lastlog.h login.h maillock.h netdb.h netgroup.h paths.h poll.h pty.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/select.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h util.h utmp.h utmpx.h) |
145 | 145 | ||
146 | dnl Checks for library functions. | 146 | dnl Checks for library functions. |
147 | AC_CHECK_FUNCS(arc4random bindresvport_af freeaddrinfo gai_strerror getaddrinfo getpagesize getnameinfo innetgr md5_crypt mkdtemp openpty rresvport_af setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy updwtmpx vsnprintf _getpty) | 147 | AC_CHECK_FUNCS(arc4random bindresvport_af freeaddrinfo gai_strerror getaddrinfo getpagesize getnameinfo innetgr md5_crypt mkdtemp openpty rresvport_af setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy updwtmpx vsnprintf _getpty) |
@@ -188,7 +188,7 @@ AC_TRY_COMPILE( | |||
188 | [AC_MSG_RESULT(no)] | 188 | [AC_MSG_RESULT(no)] |
189 | ) | 189 | ) |
190 | 190 | ||
191 | if test -z "$have_u_intxx_t" -a -z "$have_intxx_t" -a \ | 191 | if test -z "$have_u_intxx_t" -o -z "$have_intxx_t" -a \ |
192 | "x$ac_cv_header_sys_bitypes_h" = "xyes" | 192 | "x$ac_cv_header_sys_bitypes_h" = "xyes" |
193 | then | 193 | then |
194 | AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h]) | 194 | AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h]) |
diff --git a/includes.h b/includes.h index b4af0c220..3abf2851d 100644 --- a/includes.h +++ b/includes.h | |||
@@ -86,6 +86,9 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg } | |||
86 | # include <sys/poll.h> | 86 | # include <sys/poll.h> |
87 | # endif | 87 | # endif |
88 | #endif | 88 | #endif |
89 | #ifdef HAVE_SYS_SYSMACROS_H | ||
90 | # include <sys/sysmacros.h> | ||
91 | #endif | ||
89 | 92 | ||
90 | #include "version.h" | 93 | #include "version.h" |
91 | 94 | ||
diff --git a/sshconnect.c b/sshconnect.c index fb6af67df..068c23072 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -8,7 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include "includes.h" | 10 | #include "includes.h" |
11 | RCSID("$Id: sshconnect.c,v 1.21 2000/01/14 04:45:52 damien Exp $"); | 11 | RCSID("$Id: sshconnect.c,v 1.22 2000/01/19 02:45:07 damien Exp $"); |
12 | 12 | ||
13 | #ifdef HAVE_OPENSSL | 13 | #ifdef HAVE_OPENSSL |
14 | #include <openssl/bn.h> | 14 | #include <openssl/bn.h> |
@@ -1070,7 +1070,7 @@ check_host_key(char *host, struct sockaddr *hostaddr, RSA *host_key) | |||
1070 | HostStatus host_status; | 1070 | HostStatus host_status; |
1071 | HostStatus ip_status; | 1071 | HostStatus ip_status; |
1072 | int local = 0, host_ip_differ = 0; | 1072 | int local = 0, host_ip_differ = 0; |
1073 | int sa_len; | 1073 | int salen; |
1074 | char ntop[NI_MAXHOST]; | 1074 | char ntop[NI_MAXHOST]; |
1075 | 1075 | ||
1076 | /* | 1076 | /* |
@@ -1084,15 +1084,15 @@ check_host_key(char *host, struct sockaddr *hostaddr, RSA *host_key) | |||
1084 | switch (hostaddr->sa_family) { | 1084 | switch (hostaddr->sa_family) { |
1085 | case AF_INET: | 1085 | case AF_INET: |
1086 | local = (ntohl(((struct sockaddr_in *)hostaddr)->sin_addr.s_addr) >> 24) == IN_LOOPBACKNET; | 1086 | local = (ntohl(((struct sockaddr_in *)hostaddr)->sin_addr.s_addr) >> 24) == IN_LOOPBACKNET; |
1087 | sa_len = sizeof(struct sockaddr_in); | 1087 | salen = sizeof(struct sockaddr_in); |
1088 | break; | 1088 | break; |
1089 | case AF_INET6: | 1089 | case AF_INET6: |
1090 | local = IN6_IS_ADDR_LOOPBACK(&(((struct sockaddr_in6 *)hostaddr)->sin6_addr)); | 1090 | local = IN6_IS_ADDR_LOOPBACK(&(((struct sockaddr_in6 *)hostaddr)->sin6_addr)); |
1091 | sa_len = sizeof(struct sockaddr_in6); | 1091 | salen = sizeof(struct sockaddr_in6); |
1092 | break; | 1092 | break; |
1093 | default: | 1093 | default: |
1094 | local = 0; | 1094 | local = 0; |
1095 | sa_len = sizeof(struct sockaddr_storage); | 1095 | salen = sizeof(struct sockaddr_storage); |
1096 | break; | 1096 | break; |
1097 | } | 1097 | } |
1098 | if (local) { | 1098 | if (local) { |
@@ -1108,7 +1108,7 @@ check_host_key(char *host, struct sockaddr *hostaddr, RSA *host_key) | |||
1108 | options.check_host_ip = 0; | 1108 | options.check_host_ip = 0; |
1109 | 1109 | ||
1110 | if (options.check_host_ip) { | 1110 | if (options.check_host_ip) { |
1111 | if (getnameinfo(hostaddr, sa_len, ntop, sizeof(ntop), | 1111 | if (getnameinfo(hostaddr, salen, ntop, sizeof(ntop), |
1112 | NULL, 0, NI_NUMERICHOST) != 0) | 1112 | NULL, 0, NI_NUMERICHOST) != 0) |
1113 | fatal("check_host_key: getnameinfo failed"); | 1113 | fatal("check_host_key: getnameinfo failed"); |
1114 | ip = xstrdup(ntop); | 1114 | ip = xstrdup(ntop); |