Fix compilation error non non-linux architectures

This commit is contained in:
Matteo F. Vescovi 2014-05-26 09:37:54 +02:00 committed by Sergey Sharybin
parent 3e6c734eaa
commit 9b23d9acec
3 changed files with 5 additions and 2 deletions

@ -915,6 +915,9 @@ if(UNIX AND NOT APPLE)
endif()
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -pthread")
if(CMAKE_DL_LIBS)
list(APPEND PLATFORM_LINKLIBS ${CMAKE_DL_LIBS})
endif()
# lfs on glibc, all compilers should use
add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE)

@ -51,7 +51,7 @@
#undef HAVE_MALLOC_STATS
#if defined(__linux__) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__))
#if defined(__linux__) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || defined(__GLIBC__)
# include <malloc.h>
# define HAVE_MALLOC_STATS
#elif defined(__FreeBSD__)

@ -167,7 +167,7 @@ typedef unsigned long uintptr_t;
#define _UINTPTR_T_DEFINED
#endif
#elif defined(__linux__) || defined(__NetBSD__) || defined(__OpenBSD__)
#elif defined(__linux__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD_kernel__) || defined(__GNU__)
/* Linux-i386, Linux-Alpha, Linux-ppc */
#include <stdint.h>