about summary refs log tree commit diff
path: root/third_party/nix/src/libutil/config.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libutil/config.cc')
-rw-r--r--third_party/nix/src/libutil/config.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/third_party/nix/src/libutil/config.cc b/third_party/nix/src/libutil/config.cc
index c7c952abf16f..bc81ce77ceb5 100644
--- a/third_party/nix/src/libutil/config.cc
+++ b/third_party/nix/src/libutil/config.cc
@@ -3,6 +3,7 @@
 
 #include <utility>
 
+#include <absl/strings/numbers.h>
 #include <glog/logging.h>
 
 #include "args.hh"
@@ -214,7 +215,7 @@ std::string BaseSetting<std::string>::to_string() {
 template <typename T>
 void BaseSetting<T>::set(const std::string& str) {
   static_assert(std::is_integral<T>::value, "Integer required.");
-  if (!string2Int(str, value)) {
+  if (!absl::SimpleAtoi(str, &value)) {
     throw UsageError("setting '%s' has invalid value '%s'", name, str);
   }
 }