Dep: Fix build on m1 mac

This commit is contained in:
Shauren
2023-03-25 00:06:32 +01:00
parent 6af42ce82d
commit da4eedf07b
3 changed files with 18 additions and 5 deletions

View File

@@ -10,12 +10,12 @@
file(GLOB_RECURSE sources *.c)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
list(REMOVE_ITEM sources
${CMAKE_CURRENT_SOURCE_DIR}/argon2/opt.c)
else()
if(CMAKE_SYSTEM_PROCESSOR MATCHES "i686|amd64|x86_64|AMD64")
list(REMOVE_ITEM sources
${CMAKE_CURRENT_SOURCE_DIR}/argon2/ref.c)
else()
list(REMOVE_ITEM sources
${CMAKE_CURRENT_SOURCE_DIR}/argon2/opt.c)
endif()
add_library(argon2 STATIC

View File

@@ -0,0 +1,13 @@
diff --git a/dep/g3dlite/source/FileSystem.cpp b/dep/g3dlite/source/FileSystem.cpp
index 0898af7953..ff5da02344 100644
--- a/dep/g3dlite/source/FileSystem.cpp
+++ b/dep/g3dlite/source/FileSystem.cpp
@@ -35,7 +35,7 @@
# include <fnmatch.h>
# include <unistd.h>
# define _getcwd getcwd
-# if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+# if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
# define stat64 stat
# endif
# define _stat stat

View File

@@ -35,7 +35,7 @@
# include <fnmatch.h>
# include <unistd.h>
# define _getcwd getcwd
# if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
# if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
# define stat64 stat
# endif
# define _stat stat