mirror of git://anongit.mindrot.org/openssh.git
- Avoid some compiler warnings in fake-get*.c
- Add IPTOS macros for systems which lack them
This commit is contained in:
parent
73a26627f2
commit
bc7c7cceea
|
@ -1,3 +1,7 @@
|
|||
20000408
|
||||
- Avoid some compiler warnings in fake-get*.c
|
||||
- Add IPTOS macros for systems which lack them
|
||||
|
||||
20000406
|
||||
- OpenBSD CVS update:
|
||||
- [channels.c]
|
||||
|
|
10
defines.h
10
defines.h
|
@ -9,6 +9,8 @@
|
|||
|
||||
#include <netinet/in.h> /* For IPv6 macros */
|
||||
|
||||
#include <netinet/ip.h> /* For IPTOS macros */
|
||||
|
||||
#ifdef HAVE_SYS_BITYPES_H
|
||||
# include <sys/bitypes.h> /* For u_intXX_t */
|
||||
#endif
|
||||
|
@ -55,6 +57,14 @@ enum
|
|||
# define SHUT_RDWR SHUT_RDWR
|
||||
#endif
|
||||
|
||||
#ifndef IPTOS_LOWDELAY
|
||||
# define IPTOS_LOWDELAY 0x10
|
||||
# define IPTOS_THROUGHPUT 0x08
|
||||
# define IPTOS_RELIABILITY 0x04
|
||||
# define IPTOS_LOWCOST 0x02
|
||||
# define IPTOS_MINCOST IPTOS_LOWCOST
|
||||
#endif /* IPTOS_LOWDELAY */
|
||||
|
||||
/* Types */
|
||||
|
||||
/* If sys/types.h does not supply intXX_t, supply them ourselves */
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
# include <ssl/sha.h>
|
||||
#endif
|
||||
|
||||
RCSID("$Id: entropy.c,v 1.3 2000/04/04 05:04:10 damien Exp $");
|
||||
RCSID("$Id: entropy.c,v 1.4 2000/04/08 07:48:56 damien Exp $");
|
||||
|
||||
#ifdef EGD_SOCKET
|
||||
#ifndef offsetof
|
||||
|
@ -198,7 +198,6 @@ entropy_source_t entropy_sources[] = {
|
|||
{ 0.000, NULL, { NULL, NULL, NULL, NULL, NULL } },
|
||||
};
|
||||
|
||||
|
||||
double
|
||||
stir_from_system(void)
|
||||
{
|
||||
|
|
|
@ -41,7 +41,7 @@ struct addrinfo *ai;
|
|||
do {
|
||||
next = ai->ai_next;
|
||||
free(ai);
|
||||
} while (ai = next);
|
||||
} while (NULL != (ai = next));
|
||||
}
|
||||
#endif /* !HAVE_FREEADDRINFO */
|
||||
|
||||
|
@ -53,8 +53,8 @@ u_long addr;
|
|||
{
|
||||
struct addrinfo *ai;
|
||||
|
||||
if (ai = (struct addrinfo *)malloc(sizeof(struct addrinfo) +
|
||||
sizeof(struct sockaddr_in))) {
|
||||
if (NULL != (ai = (struct addrinfo *)malloc(sizeof(struct addrinfo) +
|
||||
sizeof(struct sockaddr_in)))) {
|
||||
memset(ai, 0, sizeof(struct addrinfo) + sizeof(struct sockaddr_in));
|
||||
ai->ai_addr = (struct sockaddr *)(ai + 1);
|
||||
/* XXX -- ssh doesn't use sa_len */
|
||||
|
@ -83,25 +83,25 @@ struct addrinfo **res;
|
|||
else
|
||||
port = 0;
|
||||
if (hints && hints->ai_flags & AI_PASSIVE)
|
||||
if (*res = malloc_ai(port, htonl(0x00000000)))
|
||||
if (NULL != (*res = malloc_ai(port, htonl(0x00000000))))
|
||||
return 0;
|
||||
else
|
||||
return EAI_MEMORY;
|
||||
if (!hostname)
|
||||
if (*res = malloc_ai(port, htonl(0x7f000001)))
|
||||
if (NULL != (*res = malloc_ai(port, htonl(0x7f000001))))
|
||||
return 0;
|
||||
else
|
||||
return EAI_MEMORY;
|
||||
if (inet_addr(hostname) != -1)
|
||||
if (*res = malloc_ai(port, inet_addr(hostname)))
|
||||
if (NULL != (*res = malloc_ai(port, inet_addr(hostname))))
|
||||
return 0;
|
||||
else
|
||||
return EAI_MEMORY;
|
||||
if ((hp = gethostbyname(hostname)) &&
|
||||
hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) {
|
||||
for (i = 0; hp->h_addr_list[i]; i++)
|
||||
if (cur = malloc_ai(port,
|
||||
((struct in_addr *)hp->h_addr_list[i])->s_addr)) {
|
||||
if (NULL != (cur = malloc_ai(port,
|
||||
((struct in_addr *)hp->h_addr_list[i])->s_addr))) {
|
||||
if (prev)
|
||||
prev->ai_next = cur;
|
||||
else
|
||||
|
|
|
@ -46,8 +46,8 @@ int flags;
|
|||
return 0;
|
||||
}
|
||||
else
|
||||
if (hp = gethostbyaddr((char *)&sin->sin_addr, sizeof(struct in_addr),
|
||||
AF_INET))
|
||||
if (NULL != (hp = gethostbyaddr((char *)&sin->sin_addr,
|
||||
sizeof(struct in_addr), AF_INET)))
|
||||
if (strlen(hp->h_name) > hostlen)
|
||||
return EAI_MEMORY;
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue