about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/nar-info.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libstore/nar-info.cc')
-rw-r--r--third_party/nix/src/libstore/nar-info.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/third_party/nix/src/libstore/nar-info.cc b/third_party/nix/src/libstore/nar-info.cc
index 5a217d1b617d..9f4c53e19b59 100644
--- a/third_party/nix/src/libstore/nar-info.cc
+++ b/third_party/nix/src/libstore/nar-info.cc
@@ -1,5 +1,7 @@
 #include "nar-info.hh"
 
+#include <absl/strings/numbers.h>
+
 #include "globals.hh"
 
 namespace nix {
@@ -47,13 +49,13 @@ NarInfo::NarInfo(const Store& store, const std::string& s,
     } else if (name == "FileHash") {
       fileHash = parseHashField(value);
     } else if (name == "FileSize") {
-      if (!string2Int(value, fileSize)) {
+      if (!absl::SimpleAtoi(value, &fileSize)) {
         corrupt();
       }
     } else if (name == "NarHash") {
       narHash = parseHashField(value);
     } else if (name == "NarSize") {
-      if (!string2Int(value, narSize)) {
+      if (!absl::SimpleAtoi(value, &narSize)) {
         corrupt();
       }
     } else if (name == "References") {