aboutsummaryrefslogtreecommitdiff
path: root/nis/nss_nis/nis-network.c
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nss_nis/nis-network.c')
-rw-r--r--nis/nss_nis/nis-network.c28
1 files changed, 9 insertions, 19 deletions
diff --git a/nis/nss_nis/nis-network.c b/nis/nss_nis/nis-network.c
index 0e40b6f26c..2292aea2c0 100644
--- a/nis/nss_nis/nis-network.c
+++ b/nis/nss_nis/nis-network.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2000, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
@@ -18,7 +18,11 @@
02111-1307 USA. */
#include <nss.h>
+/* The following is an ugly trick to avoid a prototype declaration for
+ _nss_nis_endgrent. */
+#define _nss_nis_endnetent _nss_nis_endnetent_XXX
#include <netdb.h>
+#undef _nss_nis_endnetent
#include <ctype.h>
#include <errno.h>
#include <stdint.h>
@@ -59,24 +63,10 @@ _nss_nis_setnetent (int stayopen)
return NSS_STATUS_SUCCESS;
}
-
-enum nss_status
-_nss_nis_endnetent (void)
-{
- __libc_lock_lock (lock);
-
- new_start = 1;
- if (oldkey != NULL)
- {
- free (oldkey);
- oldkey = NULL;
- oldkeylen = 0;
- }
-
- __libc_lock_unlock (lock);
-
- return NSS_STATUS_SUCCESS;
-}
+/* Make _nss_nis_endnetent an alias of _nss_nis_setnetent. We do this
+ even though the prototypes don't match. The argument of setnetent
+ is not used so this makes no difference. */
+strong_alias (_nss_nis_setnetent, _nss_nis_endnetent)
static enum nss_status
internal_nis_getnetent_r (struct netent *net, char *buffer, size_t buflen,