From a1309c2bd0e7469158dfa5dec3334054fad2ed03 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 6 Feb 2015 10:43:19 -0800 Subject: Exclude rpcent functions and NSS backends for rpc, key when excluding sunrpc. --- nss/Makefile | 12 ++++++++++-- nss/getent.c | 4 ++++ 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'nss') diff --git a/nss/Makefile b/nss/Makefile index d419baf..d75dad2 100644 --- a/nss/Makefile +++ b/nss/Makefile @@ -31,8 +31,16 @@ routines = nsswitch getnssent getnssent_r digits_dots \ # These are the databases that go through nss dispatch. # Caution: if you add a database here, you must add its real name # in databases.def, too. -databases = proto service hosts network grp pwd rpc ethers \ - spwd netgrp key alias sgrp +databases = proto service hosts network grp pwd ethers \ + spwd netgrp alias sgrp + +ifneq (,$(filter sunrpc,$(subdirs))) +databases += key rpc +have-sunrpc := 1 +else +have-sunrpc := 0 +endif +CPPFLAGS-getent.c = -DHAVE_SUNRPC=$(have-sunrpc) others := getent makedb install-bin := getent makedb diff --git a/nss/getent.c b/nss/getent.c index 901ec5e..34df848 100644 --- a/nss/getent.c +++ b/nss/getent.c @@ -700,6 +700,7 @@ protocols_keys (int number, char *key[]) return result; } +#if HAVE_SUNRPC /* Now is all for rpc */ static void print_rpc (struct rpcent *rpc) @@ -745,6 +746,7 @@ rpc_keys (int number, char *key[]) return result; } +#endif /* for services */ static void @@ -884,7 +886,9 @@ D(netgroup) D(networks) D(passwd) D(protocols) +#if HAVE_SUNRPC D(rpc) +#endif D(services) D(shadow) #undef D -- cgit v1.1