about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/local-store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libstore/local-store.cc')
-rw-r--r--third_party/nix/src/libstore/local-store.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/third_party/nix/src/libstore/local-store.cc b/third_party/nix/src/libstore/local-store.cc
index 84055740de..faea0fbce5 100644
--- a/third_party/nix/src/libstore/local-store.cc
+++ b/third_party/nix/src/libstore/local-store.cc
@@ -7,6 +7,7 @@
 #include <ctime>
 #include <iostream>
 
+#include <absl/strings/numbers.h>
 #include <fcntl.h>
 #include <glog/logging.h>
 #include <grp.h>
@@ -295,7 +296,7 @@ int LocalStore::getSchema() {
   int curSchema = 0;
   if (pathExists(schemaPath)) {
     std::string s = readFile(schemaPath);
-    if (!string2Int(s, curSchema)) {
+    if (!absl::SimpleAtoi(s, &curSchema)) {
       throw Error(format("'%1%' is corrupt") % schemaPath);
     }
   }