[patch] static nss broken
Andreas Jaeger
aj@suse.de
Thu Jan 4 07:22:00 GMT 2001
Compiling with --enable-static-nss fails with:
In file included from nsswitch.c:372:
function.def: In function `__nss_lookup_function':
function.def:37: conflicting types for `_nss_files_gethostent_r'
../include/netdb.h:232: previous declaration of `_nss_files_gethostent_r'
function.def:37: warning: extern declaration of `_nss_files_gethostent_r' doesn't match global one
function.def:37: conflicting types for `_nss_files_endhostent'
../include/netdb.h:232: previous declaration of `_nss_files_endhostent'
function.def:37: warning: extern declaration of `_nss_files_endhostent' doesn't match global one
[...]
I've removed the extra prototypes and added missing includes.
Ok to commit?
Andreas
2001-01-04 Andreas Jaeger <aj@suse.de>
* nss/nsswitch.c: Include files for missing prototypes, remove
buggy declaration of prototypes.
============================================================
Index: nss/nsswitch.c
--- nss/nsswitch.c 2000/03/31 05:44:26 1.49
+++ nss/nsswitch.c 2001/01/04 15:21:52
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1996,1997,1998,1999,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -27,6 +27,12 @@
#include <stdlib.h>
#include <string.h>
+#include <aliases.h>
+#include <grp.h>
+#include <netinet/ether.h>
+#include <pwd.h>
+#include <shadow.h>
+
#if !defined DO_STATIC_NSS || defined SHARED
# include <gnu/lib-names.h>
#endif
@@ -361,18 +367,6 @@
#else
/* We can't get function address dynamically in static linking. */
{
-# define DEFINE_ENT(h,nm) \
- extern void _nss_##h##_get##nm##ent_r (void); \
- extern void _nss_##h##_end##nm##ent (void); \
- extern void _nss_##h##_set##nm##ent (void);
-# define DEFINE_GET(h,nm) \
- extern void _nss_##h##_get##nm##_r (void);
-# define DEFINE_GETBY(h,nm,ky) \
- extern void _nss_##h##_get##nm##by##ky##_r (void);
-# include "function.def"
-# undef DEFINE_ENT
-# undef DEFINE_GET
-# undef DEFINE_GETBY
# define DEFINE_ENT(h,nm) \
{ #h"_get"#nm"ent_r", _nss_##h##_get##nm##ent_r }, \
{ #h"_end"#nm"ent", _nss_##h##_end##nm##ent }, \
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
More information about the Libc-hacker
mailing list