cvs commit: src/lib/libc/net getaddrinfo.c name6.c

Andrea Campi andrea+freebsd_cvs at webcom.it
Sat Apr 9 06:37:01 PDT 2005


On Wed, Apr 06, 2005 at 03:36:34PM +0000, Hajimu UMEMOTO wrote:
> ume         2005-04-06 15:36:34 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     lib/libc/net         getaddrinfo.c name6.c 
>   Log:
>   - we are no longer shareing any resources to be locked between
>     getaddrinfo(3) and getipnodeby*(3).
>   - use definitions in reentrant.h.
>   - remove obsolete comment.

This commit breaks a NO_NIS buildworld in name6.c, as gcc warns about
static _getipnodeby_thread_lock being unused, and we are compiling at a
high enough warning level for this to be fatal.

The macros are only used in the YP and ICMPNL cases, so you could fix
this by wrapping the macro definition:

#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


Bye,
	Andrea

-- 
              The best things in life are free, but the
                expensive ones are still worth a look.


More information about the cvs-src mailing list