Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions extension/data_loader/file_data_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <executorch/runtime/core/error.h>
#include <executorch/runtime/core/result.h>
#include <executorch/runtime/platform/log.h>
#include <charconv>

// Some platforms (e.g. Xtensa) do not support pread() that we use to read the
// file at different offsets simultaneously from multiple threads not affecting
Expand Down Expand Up @@ -98,8 +99,12 @@ Result<int> getFDFromUri(const char* file_descriptor_uri) {
fd_without_prefix[fd_len] = '\0';

// check if remaining fd string is a valid integer
int fd = ::atoi(fd_without_prefix);
return fd;
// int fd = strtol(fd_without_prefix, NULL, 10);
// int fd = ::atoi(fd_without_prefix);
// int fd = parse_int(fd_without_prefix);
// int fd;
// std::from_chars(fd_without_prefix, fd_without_prefix + fd_len, fd);
return 0;
}

Result<FileDataLoader> FileDataLoader::fromFileDescriptor(
Expand Down
Loading