FreeBSD Fixes

This commit is contained in:
Phillip Stephens 2015-09-12 10:25:58 -08:00
parent 574038a826
commit 0762a3bdcc
2 changed files with 11 additions and 1 deletions

View File

@ -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

View File

@ -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