summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ypldap
diff options
context:
space:
mode:
authorrodrigc <rodrigc@FreeBSD.org>2015-11-16 17:25:27 +0000
committerrodrigc <rodrigc@FreeBSD.org>2015-11-16 17:25:27 +0000
commitbba159a487b1c48b29b09dd5c4d9b725b115cfc2 (patch)
tree48f8b459e0b65bed3cce20f377771c1638d85c16 /usr.sbin/ypldap
parent68b3fb6aaf3a793d87f8bcfc7e75c1a9e0849688 (diff)
downloadFreeBSD-src-bba159a487b1c48b29b09dd5c4d9b725b115cfc2.zip
FreeBSD-src-bba159a487b1c48b29b09dd5c4d9b725b115cfc2.tar.gz
Replace __svc_fdset with svc_fdset.
FreeBSD lacks __svc_fdset and __svc_fdsetsize.
Diffstat (limited to 'usr.sbin/ypldap')
-rw-r--r--usr.sbin/ypldap/yp.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.sbin/ypldap/yp.c b/usr.sbin/ypldap/yp.c
index 01d9d23..e461136 100644
--- a/usr.sbin/ypldap/yp.c
+++ b/usr.sbin/ypldap/yp.c
@@ -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);
OpenPOWER on IntegriCloud