diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2012-07-07 20:41:53 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2012-07-07 20:41:53 +0000 |
commit | 2bf7c20198b1c33a22788fc1b86929b55520099f (patch) | |
tree | db959ae8a2b12aad9dc63ed82d92e74e0e6d795f /lib/libc | |
parent | 6cf7fea4e70a610dea5225c8fbb198002544393a (diff) |
rename function to avoid symbol clash
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/asr/asr_debug.c | 8 | ||||
-rw-r--r-- | lib/libc/asr/asr_private.h | 3 | ||||
-rw-r--r-- | lib/libc/asr/res_send_async.c | 9 |
3 files changed, 8 insertions, 12 deletions
diff --git a/lib/libc/asr/asr_debug.c b/lib/libc/asr/asr_debug.c index 98f5fe8e2e9..fcb605dc7e3 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.3 2012/04/25 20:28:25 eric Exp $ */ +/* $OpenBSD: asr_debug.c,v 1.4 2012/07/07 20:41:52 eric Exp $ */ /* * Copyright (c) 2010-2012 Eric Faurot <eric@openbsd.org> * @@ -29,8 +29,6 @@ #include "asr.h" #include "asr_private.h" -char *print_addr(const struct sockaddr *, char *, size_t); - static void asr_vdebug(const char *, va_list); static char *print_dname(const char *, char *, size_t); @@ -281,7 +279,7 @@ print_host(const struct sockaddr *sa, char *buf, size_t len) } char * -print_addr(const struct sockaddr *sa, char *buf, size_t len) +asr_print_addr(const struct sockaddr *sa, char *buf, size_t len) { char h[256]; @@ -379,7 +377,7 @@ asr_dump(struct asr *a) ac->ac_nstimeout, ac->ac_nsretries); for(i = 0; i < ac->ac_nscount; i++) - asr_printf(" %s\n", print_addr(ac->ac_ns[i], buf, + asr_printf(" %s\n", asr_print_addr(ac->ac_ns[i], buf, sizeof buf)); asr_printf("HOSTFILE %s\n", ac->ac_hostfile); asr_printf("LOOKUP"); diff --git a/lib/libc/asr/asr_private.h b/lib/libc/asr/asr_private.h index ee636f1657f..ddc3eb5da2d 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.2 2012/04/14 12:06:13 eric Exp $ */ +/* $OpenBSD: asr_private.h,v 1.3 2012/07/07 20:41:52 eric Exp $ */ /* * Copyright (c) 2012 Eric Faurot <eric@openbsd.org> * @@ -366,6 +366,7 @@ void asr_dump_async(struct async *); void asr_dump_packet(FILE *, const void *, size_t, int); void asr_printf(const char *fmt, ...); void async_set_state(struct async *, int); +char *asr_print_addr(const struct sockaddr *, char *, size_t); #else /* DEBUG */ diff --git a/lib/libc/asr/res_send_async.c b/lib/libc/asr/res_send_async.c index 3516c685ad2..cab78a3dc3d 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.1 2012/04/14 09:24:18 eric Exp $ */ +/* $OpenBSD: res_send_async.c,v 1.2 2012/07/07 20:41:52 eric Exp $ */ /* * Copyright (c) 2012 Eric Faurot <eric@openbsd.org> * @@ -44,9 +44,6 @@ static int validate_packet(struct async *); static int setup_query(struct async *, const char *, const char *, int, int); static int ensure_ibuf(struct async *, size_t); -#ifdef DEBUG -char *print_addr(const struct sockaddr *, char *, size_t); -#endif #define AS_NS_SA(p) ((p)->as_ctx->ac_ns[(p)->as_ns_idx - 1]) @@ -469,7 +466,7 @@ udp_send(struct async *as) if (asr_debug) asr_printf("asr: [%p] connecting to %s UDP\n", as, - print_addr(AS_NS_SA(as), buf, sizeof buf)); + asr_print_addr(AS_NS_SA(as), buf, sizeof buf)); #endif as->as_fd = sockaddr_connect(AS_NS_SA(as), SOCK_DGRAM); if (as->as_fd == -1) @@ -558,7 +555,7 @@ tcp_write(struct async *as) #ifdef DEBUG if (asr_debug) asr_printf("asr: [%p] connecting to %s TCP\n", as, - print_addr(AS_NS_SA(as), buf, sizeof buf)); + asr_print_addr(AS_NS_SA(as), buf, sizeof buf)); #endif as->as_fd = sockaddr_connect(AS_NS_SA(as), SOCK_STREAM); if (as->as_fd == -1) |