From f9c8b11ed7726b858cd7b7cea0d3d7c5233d78cf Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 7 Jul 2021 18:33:52 +0200 Subject: nss: Access nss_files through direct references This partially fixes static-only NSS support (bug 27959): The files module no longer needs dlopen. Support for the dns module remains to be added, and also support for disabling dlopen altogether. Reviewed-by: Adhemerval Zanella --- include/nss_files.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') diff --git a/include/nss_files.h b/include/nss_files.h index dd0081a0f1..6190cac6be 100644 --- a/include/nss_files.h +++ b/include/nss_files.h @@ -19,6 +19,7 @@ #ifndef _NSS_FILES_H #define _NSS_FILES_H +#include #include #if IS_IN (libc) #include @@ -134,6 +135,15 @@ libc_hidden_proto (_nss_files_parse_servent) libc_hidden_proto (_nss_files_parse_sgent) libc_hidden_proto (_nss_files_parse_spent) +NSS_DECLARE_MODULE_FUNCTIONS (files) +#undef DEFINE_NSS_FUNCTION +#define DEFINE_NSS_FUNCTION(x) libc_hidden_proto (_nss_files_##x) +#include +#undef DEFINE_NSS_FUNCTION + +void _nss_files_init (void (*cb) (size_t, struct traced_file *)); +libc_hidden_proto (_nss_files_init) + /* Generic implementation of fget*ent_r. Reads lines from FP until EOF or a successful parse into *RESULT using PARSER. Returns 0 on success, ENOENT on EOF, ERANGE on too-small buffer. */ -- cgit v1.2.3