From 0762a3bdcc0548188b4c637dde9f315bfeb9fc2b Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sat, 12 Sep 2015 10:25:58 -0800 Subject: [PATCH] FreeBSD Fixes --- atdna/CMakeLists.txt | 7 ++++++- include/Athena/Global.hpp | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/atdna/CMakeLists.txt b/atdna/CMakeLists.txt index 844b2bd..0505308 100644 --- a/atdna/CMakeLists.txt +++ b/atdna/CMakeLists.txt @@ -34,7 +34,12 @@ set(CLANG_INCLUDE_DIR ${LLVM_LIBRARY_DIRS}/clang/${LLVM_VERSION_STRING}/include CACHE PATH "Clang include dir" FORCE) if(UNIX) -list(APPEND PLAT_LIBS z pthread curses dl) +list(APPEND PLAT_LIBS z pthread curses) +if (APPLE) + list(APPEND PLAT_LIBS dl) +elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + list(APPEND PLAT_LIBS dl) +endif() endif() # Offer the user the choice of overriding the installation directories diff --git a/include/Athena/Global.hpp b/include/Athena/Global.hpp index ae9ca66..9659c12 100644 --- a/include/Athena/Global.hpp +++ b/include/Athena/Global.hpp @@ -47,6 +47,11 @@ typedef struct stat stat64_t; #define stat64 stat #elif _WIN32 typedef struct _stat64 stat64_t; +#elif __FreeBSD__ +typedef struct stat stat64_t; +#define stat64 stat +#define fseeko64 fseeko +#define ftello64 ftello #else typedef struct stat64 stat64_t; #endif