Re: cvsync doesn't work simply on 7-current with SYMVER_ENABLED=yes

From: Norikatsu Shigemura <nork_at_FreeBSD.org>
Date: Sun, 3 Dec 2006 01:07:32 +0900
On Wed, 29 Nov 2006 13:14:41 -0500 (EST)
Daniel Eischen <deischen_at_freebsd.org> wrote:
> I don't understand why kqueue and kevent are not found in cvsync,
> but still end up being referenced:

	cvsync doesn't use kqueue/kevent.  Maybe these are used by
	resolver in libc.

	I discussed with ume_at_.  He suggested following patch.
	I confirmed improvement.  But... (Please see also attached
	ktrace result).

	ume_at_ said that I don't know it is right.  Old resolver codes
	and RPC didn't use _kqueue.  In fact, there are some kqueue
	in some libc codes.

$ fgrep -f kqueue /usr/src/lib/libc
	:
/usr/src/lib/libc/net/nscachedcli.c:    retval->write_queue = kqueue();
/usr/src/lib/libc/net/nscachedcli.c:    retval->read_queue = kqueue();
	:
/usr/src/lib/libc/rpc/clnt_dg.c:        if ((cu->cu_kq = kqueue()) < 0) {
	:



--- lib/libc/include/un-namespace.h.orig	Wed Mar 29 03:48:49 2006
+++ lib/libc/include/un-namespace.h	Sat Dec  2 13:06:22 2006
_at__at_ -57,6 +57,7 _at__at_
 #undef		getsockname
 #undef		getsockopt
 #undef		ioctl
+#undef		kqueue
 #undef		kevent
 #undef		listen
 #undef		nanosleep
_at__at_ -234,6 +235,7 _at__at_
 #endif
 
 #ifdef _SYS_EVENT_H_
+int		_kqueue(void);
 int		_kevent(int, const struct kevent *, int, struct kevent *,
 		    int, const struct timespec *);
 #endif
--- lib/libc/resolv/res_send.c.orig	Tue Oct 24 23:41:43 2006
+++ lib/libc/resolv/res_send.c	Sat Dec  2 13:07:23 2006
_at__at_ -328,8 +328,8 _at__at_
 	terrno = ETIMEDOUT;
 
 #ifdef USE_KQUEUE
-	if ((kq = kqueue()) < 0) {
-		Perror(statp, stderr, "kqueue", errno);
+	if ((kq = _kqueue()) < 0) {
+		Perror(statp, stderr, "_kqueue", errno);
 		return (-1);
 	}
 #endif

Received on Sat Dec 02 2006 - 15:07:37 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:03 UTC