summaryrefslogtreecommitdiffstats
path: root/freebsd/include
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-11-03 15:21:06 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-11-04 13:02:55 +0100
commitb94c5ecf821db120dd4a81798257c68f3309c9a6 (patch)
tree42bae62f727cc90bb4e4655566927f33579c8a8d /freebsd/include
parentNSDISPATCH(3): Fix warning (diff)
downloadrtems-libbsd-b94c5ecf821db120dd4a81798257c68f3309c9a6.tar.bz2
NSDISPATCH(3): Add rtems_nss_register_module()
Diffstat (limited to 'freebsd/include')
-rw-r--r--freebsd/include/nsswitch.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/freebsd/include/nsswitch.h b/freebsd/include/nsswitch.h
index 112dff6d..771ccb6b 100644
--- a/freebsd/include/nsswitch.h
+++ b/freebsd/include/nsswitch.h
@@ -215,7 +215,9 @@ typedef struct _ns_mod {
void *handle; /* handle from dlopen */
ns_mtab *mtab; /* method table */
unsigned int mtabsize; /* count of entries in method table */
+#ifndef __rtems__
nss_module_unregister_fn unregister; /* called to unload module */
+#endif /* __rtems__ */
} ns_mod;
#endif /* _NS_PRIVATE */
@@ -238,6 +240,22 @@ extern int _nsyylineno;
extern void _nsdbtdump(const ns_dbt *);
#endif
#endif /* _NS_PRIVATE */
+#ifdef __rtems__
+/**
+ * @brief Registers a name service module.
+ *
+ * @param[in] source The source identifier.
+ * @param[in] mtab The module table. This table will be claimed by the name
+ * service dispatcher.
+ * @param[in] mtabsize The module table entry count.
+ *
+ * @retval 0 Successful operation.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
+ */
+int
+rtems_nss_register_module(const char *source, ns_mtab *mtab,
+ unsigned int mtabsize);
+#endif /* __rtems__ */
__END_DECLS