[Bf-blender-cvs] [2d50e5f] master: Fix T42226: Glibc <= 2.8 fails to build

Campbell Barton noreply at git.blender.org
Wed Oct 15 09:25:14 CEST 2014


Commit: 2d50e5feaaaf9fa6e73aa2b1d62921265c77d041
Author: Campbell Barton
Date:   Wed Oct 15 09:23:43 2014 +0200
Branches: master
https://developer.blender.org/rB2d50e5feaaaf9fa6e73aa2b1d62921265c77d041

Fix T42226: Glibc <= 2.8 fails to build

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

M	source/blender/blenlib/BLI_sort.h
M	source/blender/blenlib/intern/sort.c

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

diff --git a/source/blender/blenlib/BLI_sort.h b/source/blender/blenlib/BLI_sort.h
index 516f917..cb6b87b 100644
--- a/source/blender/blenlib/BLI_sort.h
+++ b/source/blender/blenlib/BLI_sort.h
@@ -35,7 +35,8 @@
 
 #include <stdlib.h>
 
-#ifdef __GLIBC__
+/* glibc 2.8+ */
+#if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8))
 #  define BLI_qsort_r qsort_r
 #endif
 
diff --git a/source/blender/blenlib/intern/sort.c b/source/blender/blenlib/intern/sort.c
index 9fad750..d7c314c 100644
--- a/source/blender/blenlib/intern/sort.c
+++ b/source/blender/blenlib/intern/sort.c
@@ -32,7 +32,7 @@
 
 #include <stdlib.h>
 
-#ifndef __GLIBC__
+#if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8))
 
 #include "BLI_utildefines.h"




More information about the Bf-blender-cvs mailing list