Fix compilation error non non-linux architectures
This commit is contained in:

committed by
Sergey Sharybin

parent
3e6c734eaa
commit
9b23d9acec
@@ -915,6 +915,9 @@ if(UNIX AND NOT APPLE)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -pthread")
|
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
|
# lfs on glibc, all compilers should use
|
||||||
add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE)
|
add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE)
|
||||||
|
@@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
#undef HAVE_MALLOC_STATS
|
#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>
|
# include <malloc.h>
|
||||||
# define HAVE_MALLOC_STATS
|
# define HAVE_MALLOC_STATS
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__)
|
||||||
|
@@ -167,7 +167,7 @@ typedef unsigned long uintptr_t;
|
|||||||
#define _UINTPTR_T_DEFINED
|
#define _UINTPTR_T_DEFINED
|
||||||
#endif
|
#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 */
|
/* Linux-i386, Linux-Alpha, Linux-ppc */
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
Reference in New Issue
Block a user