summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authoreric <eric@openbsd.org>2012-09-06 15:05:16 +0000
committereric <eric@openbsd.org>2012-09-06 15:05:16 +0000
commit262cf3f83cdbd553ad7b1911d8d86c0037d66365 (patch)
treede01efc065f055ac28fccf96fe1e297c4461a431 /lib/libc
parentmake it easy to build without debug code (diff)
downloadwireguard-openbsd-262cf3f83cdbd553ad7b1911d8d86c0037d66365.tar.xz
wireguard-openbsd-262cf3f83cdbd553ad7b1911d8d86c0037d66365.zip
include yp headers if necessary.
remove unused variable.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/asr/getaddrinfo_async.c10
-rw-r--r--lib/libc/asr/gethostnamadr_async.c8
2 files changed, 15 insertions, 3 deletions
diff --git a/lib/libc/asr/getaddrinfo_async.c b/lib/libc/asr/getaddrinfo_async.c
index 1996c2a6c56..bc327c19eea 100644
--- a/lib/libc/asr/getaddrinfo_async.c
+++ b/lib/libc/asr/getaddrinfo_async.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getaddrinfo_async.c,v 1.7 2012/09/05 21:49:12 eric Exp $ */
+/* $OpenBSD: getaddrinfo_async.c,v 1.8 2012/09/06 15:05:16 eric Exp $ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
@@ -24,6 +24,12 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#ifdef YP
+#include <rpc/rpc.h>
+#include <rpcsvc/yp.h>
+#include <rpcsvc/ypclnt.h>
+#include "ypinternal.h"
+#endif
#include "asr.h"
#include "asr_private.h"
@@ -675,7 +681,7 @@ static int
addrinfo_from_yp(struct async *as, int family, char *line)
{
char *next, *tokens[MAXTOKEN], *c;
- int i, ntok;
+ int ntok;
union {
struct sockaddr sa;
struct sockaddr_in sain;
diff --git a/lib/libc/asr/gethostnamadr_async.c b/lib/libc/asr/gethostnamadr_async.c
index 9e2299d20d2..66b46dec3ed 100644
--- a/lib/libc/asr/gethostnamadr_async.c
+++ b/lib/libc/asr/gethostnamadr_async.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gethostnamadr_async.c,v 1.7 2012/09/04 16:03:21 eric Exp $ */
+/* $OpenBSD: gethostnamadr_async.c,v 1.8 2012/09/06 15:05:16 eric Exp $ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
@@ -26,6 +26,12 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#ifdef YP
+#include <rpc/rpc.h>
+#include <rpcsvc/yp.h>
+#include <rpcsvc/ypclnt.h>
+#include "ypinternal.h"
+#endif
#include "asr.h"
#include "asr_private.h"