Control: tags -1 + patch

On 2014-05-16 09:02:34, Rebecca N. Palmer wrote:
> Package: blender
> Version: 2.70-2
> Tags: patch
> 
> blender 2.70 fails to build on kFreeBSD with
> /«PKGBUILDDIR»/intern/guardedalloc/intern/mallocn_intern.h:66:4: error:
> #error "We don't know how to use malloc_usable_size on your platform"
> 
> It appears that this file is checking for Linux ( #if defined(__linux__) at
> line 54) when it should be checking for GNU libc ( __GLIBC__, 
> https://wiki.debian.org/Debian_GNU/kFreeBSD_FAQ?highlight=%28kfreebsd%29#Q._How_do_I_detect_kfreebsd_with_preprocessor_directives_in_a_C_program.3F),
> though I have not tested this fix.

The attached patch should be enough to fix this issue.

Cheers
-- 
Sebastian Ramacher
--- blender-2.70a.orig/intern/guardedalloc/intern/mallocn_intern.h
+++ blender-2.70a/intern/guardedalloc/intern/mallocn_intern.h
@@ -51,7 +51,7 @@
 
 #undef HAVE_MALLOC_STATS
 
-#if defined(__linux__)
+#if defined(__linux__) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__))
 #  include <malloc.h>
 #  define HAVE_MALLOC_STATS
 #elif defined(__FreeBSD__)

Attachment: signature.asc
Description: Digital signature

Reply via email to