summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/getnetgrent.c
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1995-04-04 05:36:16 +0000
committerwpaul <wpaul@FreeBSD.org>1995-04-04 05:36:16 +0000
commitfd72f57342162b4d6d9fddb7dbb789e23e3edf80 (patch)
treea09863032a50b1e4a5a2e09112bd00a360d9aa08 /lib/libc/gen/getnetgrent.c
parentd5e3b4577028238a0c0130fdb7cc0189a4d34067 (diff)
downloadFreeBSD-src-fd72f57342162b4d6d9fddb7dbb789e23e3edf80.zip
FreeBSD-src-fd72f57342162b4d6d9fddb7dbb789e23e3edf80.tar.gz
getpwent.c: fix problem with emacs dumping core when NIS is enabled. Also
add #includes for YP headers when compiling with -DYP to avoid some implicit declarations. getgrent.c & getnetgrent.c: add some #includes to avoid implicit declarations of YP functions.
Diffstat (limited to 'lib/libc/gen/getnetgrent.c')
-rw-r--r--lib/libc/gen/getnetgrent.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/libc/gen/getnetgrent.c b/lib/libc/gen/getnetgrent.c
index 1b581cf..c60cc4e 100644
--- a/lib/libc/gen/getnetgrent.c
+++ b/lib/libc/gen/getnetgrent.c
@@ -40,6 +40,15 @@ static char sccsid[] = "@(#)getnetgrent.c 8.1 (Berkeley) 6/4/93";
#include <stdio.h>
#include <strings.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#ifdef YP
+#include <rpc/rpc.h>
+#include <rpcsvc/yp_prot.h>
+#include <rpcsvc/ypclnt.h>
+static int _netgr_yp_enabled;
+#endif
#define _PATH_NETGROUP "/etc/netgroup"
@@ -77,9 +86,6 @@ static struct {
};
static FILE *netf = (FILE *)0;
static int parse_netgrp();
-#ifdef YP
-static int _netgr_yp_enabled;
-#endif
static struct linelist *read_for_group();
void setnetgrent(), endnetgrent();
int getnetgrent(), innetgr();
OpenPOWER on IntegriCloud