summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2005-04-09 14:20:18 +0000
committerume <ume@FreeBSD.org>2005-04-09 14:20:18 +0000
commit1b9c36cc46d51f70af44b3a5e15adda1896c2cdf (patch)
treef5b59d293c6c342a2f10996db8ffb70708a55bd0 /lib
parente408f4b595312e0d7196feefd84b13eb4071e831 (diff)
downloadFreeBSD-src-1b9c36cc46d51f70af44b3a5e15adda1896c2cdf.zip
FreeBSD-src-1b9c36cc46d51f70af44b3a5e15adda1896c2cdf.tar.gz
unbreak build without YP defined.
Submitted by: Andrea Campi <andrea+freebsd_cvs_at_webcom.it>
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/net/name6.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libc/net/name6.c b/lib/libc/net/name6.c
index f00ce26..a738b95 100644
--- a/lib/libc/net/name6.c
+++ b/lib/libc/net/name6.c
@@ -91,7 +91,9 @@
__FBSDID("$FreeBSD$");
#include "namespace.h"
+#if defined(YP) || defined(ICMPNL)
#include "reentrant.h"
+#endif
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/time.h>
@@ -235,9 +237,11 @@ static int _icmp_ghbyaddr(void *, void *, va_list);
* XXX: Many dependencies are not thread-safe. Still, we cannot use
* getipnodeby*() in conjunction with other functions which call them.
*/
+#if defined(YP) || defined(ICMPNL)
static mutex_t _getipnodeby_thread_lock = MUTEX_INITIALIZER;
#define THREAD_LOCK() mutex_lock(&_getipnodeby_thread_lock);
#define THREAD_UNLOCK() mutex_unlock(&_getipnodeby_thread_lock);
+#endif
/* Host lookup order if nsswitch.conf is broken or nonexistant */
static const ns_src default_src[] = {
OpenPOWER on IntegriCloud