[Bf-blender-cvs] [9b23d9a] master: Fix compilation error non non-linux architectures

Matteo F. Vescovi noreply at git.blender.org
Mon Jun 2 12:27:42 CEST 2014


Commit: 9b23d9acec9aa88f1d810a40816b83b8d94df44b
Author: Matteo F. Vescovi
Date:   Mon May 26 09:37:54 2014 +0200
https://developer.blender.org/rB9b23d9acec9aa88f1d810a40816b83b8d94df44b

Fix compilation error non non-linux architectures

===================================================================

M	CMakeLists.txt
M	intern/guardedalloc/intern/mallocn_intern.h
M	source/blender/blenlib/BLI_sys_types.h

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2962b58..7385182 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 a9d559e..7c8922d 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 b0a8ade..fcbed1d 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>




More information about the Bf-blender-cvs mailing list