Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Nov 2015 17:25:28 +0000 (UTC)
From:      Craig Rodrigues <rodrigc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r290941 - head/usr.sbin/ypldap
Message-ID:  <201511161725.tAGHPSHf064324@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rodrigc
Date: Mon Nov 16 17:25:27 2015
New Revision: 290941
URL: https://svnweb.freebsd.org/changeset/base/290941

Log:
  Replace __svc_fdset with svc_fdset.
  
  FreeBSD lacks __svc_fdset and __svc_fdsetsize.

Modified:
  head/usr.sbin/ypldap/yp.c

Modified: head/usr.sbin/ypldap/yp.c
==============================================================================
--- head/usr.sbin/ypldap/yp.c	Mon Nov 16 17:11:11 2015	(r290940)
+++ head/usr.sbin/ypldap/yp.c	Mon Nov 16 17:25:27 2015	(r290941)
@@ -82,13 +82,12 @@ yp_disable_events(void)
 void
 yp_enable_events(void)
 {
-	int		 i;
-	extern fd_set	*__svc_fdset;
-	extern int	 __svc_fdsetsize;
+	int i;
+	extern fd_set	svc_fdset;
 	struct yp_event	*ye;
 
-	for (i = 0; i < __svc_fdsetsize; i++) {
-		if (FD_ISSET(i, __svc_fdset)) {
+	for (i = 0; i < getdtablesize(); i++) {
+		if (FD_ISSET(i, &svc_fdset)) {
 			if ((ye = calloc(1, sizeof(*ye))) == NULL)
 				fatal(NULL);
 			event_set(&ye->ye_event, i, EV_READ, yp_fd_event, NULL);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511161725.tAGHPSHf064324>