Move initLibUtil() from initNix to initLibStore

libutil is a dependency of libstore, so it should always be
initialized as such.
libutil is also a dependency of libmain. Being explicit about this
dependency might be good, but not worth the slight code complexity
until the library structure gets more advanced.

Part of an effort to make it easier to initialize the right things,
by moving code into the appropriate libraries.
This commit is contained in:
Robert Hensing 2023-02-01 17:43:14 +01:00
parent 1107ea363f
commit 781d3dceb3
2 changed files with 2 additions and 1 deletions

View file

@ -118,7 +118,6 @@ void initNix()
std::cerr.rdbuf()->pubsetbuf(buf, sizeof(buf));
#endif
initLibUtil();
initLibStore();
startSignalHandlerThread();

View file

@ -336,6 +336,8 @@ void assertLibStoreInitialized() {
void initLibStore() {
initLibUtil();
if (sodium_init() == -1)
throw Error("could not initialise libsodium");