mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-09 07:32:09 -04:00
Link get*.c into build
INADDR_LOOPBACK is not defined for all OSs
This commit is contained in:
parent
c7620c99f1
commit
369083db00
3 changed files with 15 additions and 7 deletions
|
|
@ -26,12 +26,14 @@ CDEFINES =
|
|||
CWARNINGS =
|
||||
|
||||
# Alphabetically
|
||||
OBJS = context.@O@ lwbuffer.@O@ lwpacket.@O@ lwresutil.@O@ \
|
||||
lwres_gabn.@O@ lwres_gnba.@O@ lwres_noop.@O@
|
||||
OBJS = context.@O@ getaddrinfo.@O@ gethost.@O@ getipnode.@O@ \
|
||||
getnameinfo.@O@ getnet.@O@ lwbuffer.@O@ lwpacket.@O@ \
|
||||
lwresutil.@O@ lwres_gabn.@O@ lwres_gnba.@O@ lwres_noop.@O@
|
||||
|
||||
# Alphabetically
|
||||
SRCS = context.c lwbuffer.c lwpacket.c lwres.c \
|
||||
lwres_gabn.c lwres_gnba.c lwres_noop.c
|
||||
SRCS = context.c getaddrinfo.c gethost.c getipnode.c \
|
||||
getnameinfo.c getnet.c lwbuffer.c lwpacket.c \
|
||||
lwres.c lwres_gabn.c lwres_gnba.c lwres_noop.c
|
||||
|
||||
LIBS = @LIBS@
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,10 @@ static void *lwres_malloc(void *, size_t);
|
|||
static void lwres_free(void *, void *, size_t);
|
||||
static int context_connect(lwres_context_t *);
|
||||
|
||||
#ifndef INADDR_LOOPBACK
|
||||
#define INADDR_LOOPBACK 0x7f000001UL
|
||||
#endif
|
||||
|
||||
int
|
||||
lwres_context_create(lwres_context_t **contextp, void *arg,
|
||||
lwres_malloc_t malloc_function,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* The Berkeley Software Design Inc. software License Agreement specifies
|
||||
* the terms and conditions for redistribution.
|
||||
*
|
||||
* BSDI $Id: getaddrinfo.c,v 1.3 2000/01/17 03:16:24 marka Exp $
|
||||
* BSDI $Id: getaddrinfo.c,v 1.4 2000/01/18 05:37:19 marka Exp $
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -346,7 +346,8 @@ add_ipv4(const char *hostname, int flags, struct addrinfo **aip,
|
|||
*aip = ai;
|
||||
ai->ai_socktype = socktype;
|
||||
SIN(ai->ai_addr)->sin_port = port;
|
||||
memcpy(&SIN(ai->ai_addr)->sin_addr, by->addrs[i], 4);
|
||||
memcpy(&SIN(ai->ai_addr)->sin_addr,
|
||||
by->addrs[i].address, 4);
|
||||
if (flags & AI_CANONNAME)
|
||||
ai->ai_canonname = strdup(by->real_name);
|
||||
}
|
||||
|
|
@ -394,7 +395,8 @@ add_ipv6(const char *hostname, int flags, struct addrinfo **aip,
|
|||
*aip = ai;
|
||||
ai->ai_socktype = socktype;
|
||||
SIN6(ai->ai_addr)->sin6_port = port;
|
||||
memcpy(&SIN6(ai->ai_addr)->sin6_addr, by->addrs[i], 16);
|
||||
memcpy(&SIN6(ai->ai_addr)->sin6_addr,
|
||||
by->addrs[i].address, 16);
|
||||
if (flags & AI_CANONNAME)
|
||||
ai->ai_canonname = strdup(by->real_name);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue