library: Add option to register additional namespaces before calling library_init()

Because settings are already accessed in library_init(), calling
add_fallback() externally after calling library_init() is not ideal.
This way namespaces already serve as fallback while library_init() is
executed and they are also in the correct order so that libstrongswan is
always the last root section.
This commit is contained in:
Tobias Brunner
2016-03-08 10:56:19 +01:00
parent 101abed566
commit 5c8dc908d0
2 changed files with 43 additions and 2 deletions
+11 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010-2014 Tobias Brunner
* Copyright (C) 2010-2016 Tobias Brunner
* Copyright (C) 2008 Martin Willi
* Hochschule fuer Technik Rapperswil
*
@@ -276,4 +276,14 @@ void library_deinit();
*/
extern library_t *lib;
/**
* Add additional names used as alias for the namespace registered with
* library_init().
*
* To be called from __attribute__((constructor)) functions.
*
* @param ns additional namespace
*/
void library_add_namespace(char *ns);
#endif /** LIBRARY_H_ @}*/