From: jca Date: Sat, 20 Jun 2015 01:16:25 +0000 (+0000) Subject: Rename print_sockaddr() to avoid symbol visibility problems X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=134ba20573f906a2d384ee722dc0ff91e36c5358;p=openbsd Rename print_sockaddr() to avoid symbol visibility problems print_sockaddr is internal to asr, and conflicts with ports/net/samba4. ok eric@ --- diff --git a/lib/libc/asr/asr_debug.c b/lib/libc/asr/asr_debug.c index 33bdf347f2c..2abb6e15140 100644 --- a/lib/libc/asr/asr_debug.c +++ b/lib/libc/asr/asr_debug.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asr_debug.c,v 1.18 2015/05/26 19:28:57 eric Exp $ */ +/* $OpenBSD: asr_debug.c,v 1.19 2015/06/20 01:16:25 jca Exp $ */ /* * Copyright (c) 2012 Eric Faurot * @@ -219,7 +219,7 @@ asr_dump_packet(FILE *f, const void *data, size_t len) } const char * -print_sockaddr(const struct sockaddr *sa, char *buf, size_t len) +asr_print_sockaddr(const struct sockaddr *sa, char *buf, size_t len) { char h[256]; int portno; @@ -300,7 +300,7 @@ asr_dump_config(FILE *f, struct asr *a) ac->ac_nstimeout, ac->ac_nsretries); for (i = 0; i < ac->ac_nscount; i++) - fprintf(f, " %s\n", print_sockaddr(ac->ac_ns[i], buf, + fprintf(f, " %s\n", asr_print_sockaddr(ac->ac_ns[i], buf, sizeof buf)); fprintf(f, "LOOKUP %s", ac->ac_db); fprintf(f, "\n------------------------------------\n"); diff --git a/lib/libc/asr/asr_private.h b/lib/libc/asr/asr_private.h index 31c4f4d33d1..cd508cf5726 100644 --- a/lib/libc/asr/asr_private.h +++ b/lib/libc/asr/asr_private.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asr_private.h,v 1.30 2015/06/04 19:23:17 eric Exp $ */ +/* $OpenBSD: asr_private.h,v 1.31 2015/06/20 01:16:25 jca Exp $ */ /* * Copyright (c) 2012 Eric Faurot * @@ -342,7 +342,7 @@ struct asr_query *gethostbyaddr_async_ctx(const void *, socklen_t, int, const char *asr_querystr(int); const char *asr_statestr(int); const char *asr_transitionstr(int); -const char *print_sockaddr(const struct sockaddr *, char *, size_t); +const char *asr_print_sockaddr(const struct sockaddr *, char *, size_t); void asr_dump_config(FILE *, struct asr *); void asr_dump_packet(FILE *, const void *, size_t); diff --git a/lib/libc/asr/res_send_async.c b/lib/libc/asr/res_send_async.c index 9afc8d06363..3404b79c802 100644 --- a/lib/libc/asr/res_send_async.c +++ b/lib/libc/asr/res_send_async.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_send_async.c,v 1.22 2014/03/26 18:13:15 eric Exp $ */ +/* $OpenBSD: res_send_async.c,v 1.23 2015/06/20 01:16:25 jca Exp $ */ /* * Copyright (c) 2012 Eric Faurot * @@ -426,7 +426,7 @@ udp_send(struct asr_query *as) #endif DPRINT("asr: [%p] connecting to %s UDP\n", as, - print_sockaddr(AS_NS_SA(as), buf, sizeof buf)); + asr_print_sockaddr(AS_NS_SA(as), buf, sizeof buf)); as->as_fd = sockaddr_connect(AS_NS_SA(as), SOCK_DGRAM); if (as->as_fd == -1) @@ -503,7 +503,7 @@ tcp_write(struct asr_query *as) /* First try to connect if not already */ if (as->as_fd == -1) { DPRINT("asr: [%p] connecting to %s TCP\n", as, - print_sockaddr(AS_NS_SA(as), buf, sizeof buf)); + asr_print_sockaddr(AS_NS_SA(as), buf, sizeof buf)); as->as_fd = sockaddr_connect(AS_NS_SA(as), SOCK_STREAM); if (as->as_fd == -1) return (-1); /* errno set */