diff options
author | Robert Hensing <robert@roberthensing.nl> | 2023-02-01 17:43:14 +0100 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2023-04-07 16:24:18 +0200 |
commit | 781d3dceb303d9fceabe9a39eae0f7f986e1adcc (patch) | |
tree | 61d35aafed5a5b62b1d8b9d3418682fe8455ff13 /src | |
parent | 1107ea363f600f37152e2b144d03c4071c2a6b6b (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/libmain/shared.cc | 1 | ||||
-rw-r--r-- | src/libstore/globals.cc | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index a25865aad..56f47a4ac 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -118,7 +118,6 @@ void initNix() std::cerr.rdbuf()->pubsetbuf(buf, sizeof(buf)); #endif - initLibUtil(); initLibStore(); startSignalHandlerThread(); diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc index 5a8825be5..3f944f024 100644 --- a/src/libstore/globals.cc +++ b/src/libstore/globals.cc @@ -336,6 +336,8 @@ void assertLibStoreInitialized() { void initLibStore() { + initLibUtil(); + if (sodium_init() == -1) throw Error("could not initialise libsodium"); |