move udns build directly into the mod_enum makefile so it gets all our cflags

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4919 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2007-04-11 14:37:40 +00:00
parent 14b9a90906
commit a483c238b9
2 changed files with 12 additions and 16 deletions

View File

@ -46,9 +46,6 @@
# include <unistd.h>
# include <fcntl.h>
# include <sys/time.h>
# ifdef HAVE_CONFIG_H
# include <config.h>
# endif
# ifdef HAVE_POLL
# include <sys/poll.h>
# endif
@ -77,7 +74,7 @@
# define EAFNOSUPPORT EINVAL
#endif
union sockaddr_ns {
union usockaddr_ns {
struct sockaddr sa;
struct sockaddr_in sin;
#if HAVE_INET6
@ -184,7 +181,7 @@ struct dns_ctx { /* resolver context */
unsigned dnsc_port; /* default port (DNS_PORT) */
unsigned dnsc_udpbuf; /* size of UDP buffer */
/* array of nameserver addresses */
union sockaddr_ns dnsc_serv[DNS_MAXSERV];
union usockaddr_ns dnsc_serv[DNS_MAXSERV];
unsigned dnsc_nserv; /* number of nameservers */
unsigned dnsc_salen; /* length of socket addresses */
/* search list for unqualified names */
@ -272,7 +269,7 @@ enum {
};
static int dns_add_serv_internal(struct dns_ctx *ctx, const char *serv) {
union sockaddr_ns *sns;
union usockaddr_ns *sns;
if (!serv)
return (ctx->dnsc_nserv = 0);
if (ctx->dnsc_nserv >= DNS_MAXSERV)
@ -688,7 +685,7 @@ dns_socket dns_open(struct dns_ctx *ctx) {
dns_socket sock;
unsigned i;
int port;
union sockaddr_ns *sns;
union usockaddr_ns *sns;
#if HAVE_INET6
unsigned have_inet6 = 0;
#endif
@ -922,7 +919,7 @@ static void dns_send(struct dns_ctx *ctx, struct dns_query *q, time_t now) {
return;
}
DNS_DBGQ(ctx, q, 1,
&ctx->dnsc_serv[q->dnsq_servi].sa, sizeof(union sockaddr_ns),
&ctx->dnsc_serv[q->dnsq_servi].sa, sizeof(union usockaddr_ns),
q->dnsq_buf, q->dnsq_len);
q->dnsq_servwait |= 1 << q->dnsq_servi; /* expect reply from this ns */
@ -1045,7 +1042,7 @@ void dns_ioevent(struct dns_ctx *ctx, time_t now) {
dnsc_t *pbuf;
dnscc_t *pend, *pcur;
void *result;
union sockaddr_ns sns;
union usockaddr_ns sns;
socklen_t slen;
SETCTX(ctx);

View File

@ -1,11 +1,10 @@
BASE=../../../..
UDNS_DIR=$(BASE)/libs/udns
UDNSA=$(UDNS_DIR)/libudns.a
LOCAL_CFLAGS=-I$(UDNS_DIR)
LOCAL_LIBADD=$(UDNSA)
LOCAL_CFLAGS=-I$(UDNS_DIR) -DHAVE_POLL
LOCAL_OBJS=$(UDNS_DIR)/udns_dn.o $(UDNS_DIR)/udns_dntosp.o $(UDNS_DIR)/udns_parse.o $(UDNS_DIR)/udns_misc.o \
$(UDNS_DIR)/udns_rr_a.o $(UDNS_DIR)/udns_rr_ptr.o $(UDNS_DIR)/udns_rr_mx.o $(UDNS_DIR)/udns_rr_txt.o $(UDNS_DIR)/udns_bl.o \
$(UDNS_DIR)/udns_rr_srv.o $(UDNS_DIR)/udns_rr_naptr.o $(UDNS_DIR)/udns_codes.o $(UDNS_DIR)/udns_resolver.o
include $(BASE)/build/modmake.rules
$(UDNSA): $(UDNS_DIR) $(UDNS_DIR)/.update
cd $(UDNS_DIR) && $(MAKE) staticlib
$(TOUCH_TARGET)