diff options
author | Matteo F. Vescovi <mfvescovi@gmail.com> | 2014-05-26 11:37:54 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-06-02 14:26:38 +0400 |
commit | 9b23d9acec9aa88f1d810a40816b83b8d94df44b (patch) | |
tree | 12ddd0497a659f91b42e8b951b70735adb954ce5 | |
parent | 3e6c734eaa3ed3a12dccc84a3c39ecda050ccb37 (diff) |
Fix compilation error non non-linux architectures
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | intern/guardedalloc/intern/mallocn_intern.h | 2 | ||||
-rw-r--r-- | source/blender/blenlib/BLI_sys_types.h | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2962b58824d..738518235d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/intern/guardedalloc/intern/mallocn_intern.h b/intern/guardedalloc/intern/mallocn_intern.h index a9d559e48f9..7c8922dd407 100644 --- a/intern/guardedalloc/intern/mallocn_intern.h +++ b/intern/guardedalloc/intern/mallocn_intern.h @@ -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__) diff --git a/source/blender/blenlib/BLI_sys_types.h b/source/blender/blenlib/BLI_sys_types.h index b0a8adeef22..fcbed1daf66 100644 --- a/source/blender/blenlib/BLI_sys_types.h +++ b/source/blender/blenlib/BLI_sys_types.h @@ -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> |