aboutsummaryrefslogtreecommitdiff
path: root/include/nss_files.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-07-07 18:33:52 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-07-07 18:33:52 +0200
commitf9c8b11ed7726b858cd7b7cea0d3d7c5233d78cf (patch)
tree7a7ebab1e97c4fb74bd7bdf2cee773557d83bdd8 /include/nss_files.h
parent6212bb67f4695962748a5981e1b9fea105af74f6 (diff)
downloadglibc-f9c8b11ed7726b858cd7b7cea0d3d7c5233d78cf.zip
glibc-f9c8b11ed7726b858cd7b7cea0d3d7c5233d78cf.tar.gz
glibc-f9c8b11ed7726b858cd7b7cea0d3d7c5233d78cf.tar.bz2
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 <adhemerval.zanella@linaro.org>
Diffstat (limited to 'include/nss_files.h')
-rw-r--r--include/nss_files.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/nss_files.h b/include/nss_files.h
index dd0081a..6190cac 100644
--- a/include/nss_files.h
+++ b/include/nss_files.h
@@ -19,6 +19,7 @@
#ifndef _NSS_FILES_H
#define _NSS_FILES_H
+#include <nss.h>
#include <stdio.h>
#if IS_IN (libc)
#include <libc-lock.h>
@@ -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 <nss/function.def>
+#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. */