diff options
Diffstat (limited to 'third_party/nix/src/libstore/globals.cc')
-rw-r--r-- | third_party/nix/src/libstore/globals.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/third_party/nix/src/libstore/globals.cc b/third_party/nix/src/libstore/globals.cc index 61293dffed50..7307f035275f 100644 --- a/third_party/nix/src/libstore/globals.cc +++ b/third_party/nix/src/libstore/globals.cc @@ -4,6 +4,7 @@ #include <map> #include <thread> +#include <absl/strings/numbers.h> #include <dlfcn.h> #include "archive.hh" @@ -163,7 +164,7 @@ void BaseSetting<SandboxMode>::convertToArg(Args& args, void MaxBuildJobsSetting::set(const std::string& str) { if (str == "auto") { value = std::max(1U, std::thread::hardware_concurrency()); - } else if (!string2Int(str, value)) { + } else if (!absl::SimpleAtoi(str, &value)) { throw UsageError( "configuration setting '%s' should be 'auto' or an integer", name); } |