summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorKaiser <whilhelm@sdf.org>2021-12-08 18:06:26 -0500
committerGitHub <noreply@github.com>2021-12-08 20:06:26 -0300
commitfa46f13b0920b4255781db55d9244a723975b1b2 (patch)
tree179abb7b98de818fc03206c47e0cd90f686cce70 /deps
parent85abfafb2b98cadc9bc2894279ca2c48c5c51434 (diff)
feat(Core/Build): Patched to be buildable on FreeBSD 13.0-RELEASE (#9568)
Diffstat (limited to 'deps')
-rw-r--r--deps/g3dlite/include/G3D/System.h3
-rw-r--r--deps/g3dlite/source/FileSystem.cpp8
2 files changed, 5 insertions, 6 deletions
diff --git a/deps/g3dlite/include/G3D/System.h b/deps/g3dlite/include/G3D/System.h
index 9ed88957d7..10995247b1 100644
--- a/deps/g3dlite/include/G3D/System.h
+++ b/deps/g3dlite/include/G3D/System.h
@@ -20,8 +20,7 @@
#include "G3D/BinaryFormat.h"
#include "G3D/FileNotFound.h"
#include <string>
-
-#if defined(__aarch64__)
+#if defined(__aarch64__) || defined(__FreeBSD__)
#include <sys/time.h>
#endif
diff --git a/deps/g3dlite/source/FileSystem.cpp b/deps/g3dlite/source/FileSystem.cpp
index 06e6ff00a5..eb41522f79 100644
--- a/deps/g3dlite/source/FileSystem.cpp
+++ b/deps/g3dlite/source/FileSystem.cpp
@@ -26,9 +26,9 @@
// Needed for _findfirst
# include <io.h>
# ifdef __MINGW32__
-# define stat64 stat
+# define stat stat
# else
-# define stat64 _stat64
+# define stat _stat
# endif
#else
# include <dirent.h>
@@ -580,8 +580,8 @@ bool FileSystem::_isNewer(const std::string& _src, const std::string& _dst) {
int64 FileSystem::_size(const std::string& _filename) {
const std::string& filename = FilePath::canonicalize(FilePath::expandEnvironmentVariables(_filename));
- struct stat64 st;
- int result = stat64(filename.c_str(), &st);
+ struct stat st;
+ int result = stat(filename.c_str(), &st);
if (result == -1) {
#if _HAVE_ZIP /* G3DFIX: Use ZIP-library only if defined */