Taken from: https://sources.debian.org/src/draco/1.5.6+dfsg-3/debian/patches/0006-Fix-tinygltf-FsCallbacks.patch/


--- src/draco/io/gltf_decoder.cc.orig
+++ src/draco/io/gltf_decoder.cc
@@ -427,6 +427,13 @@
   return WriteBufferToFile(contents.data(), contents.size(), filepath);
 }
 
+bool GetFileSizeInBytes(size_t *out, std::string * /*err*/,
+                        const std::string &filepath, void * /*user_data*/) {
+  *out = GetFileSize(filepath);
+  return true;
+}
+
+
 }  // namespace
 
 GltfDecoder::GltfDecoder()
@@ -486,6 +493,7 @@
       // TinyGLTF's ExpandFilePath does not do filesystem i/o, so it's safe to
       // use in all environments.
       &tinygltf::ExpandFilePath, &ReadWholeFile, &WriteWholeFile,
+      &GetFileSizeInBytes,
       reinterpret_cast<void *>(input_files)};
 
   loader.SetFsCallbacks(fs_callbacks);
