View | Details | Raw Unified | Return to bug 266227 | Differences between
and this patch

Collapse All | Expand All

(-)b/databases/pointcloud/files/patch-lib_sort__r_sort__r.h (-1 / +24 lines)
Added Link Here
0
- 
1
--- lib/sort_r/sort_r.h.orig	2022-09-12 07:14:10 UTC
2
+++ lib/sort_r/sort_r.h
3
@@ -27,10 +27,10 @@ void sort_r(void *base, size_t nel, size_t width,
4
 #define _SORT_R_INLINE inline
5
 
6
 #if (defined __APPLE__ || defined __MACH__ || defined __DARWIN__ || \
7
-     defined __FreeBSD__ || defined __DragonFly__)
8
+     (defined __FreeBSD__ && !defined(qsort_r)) || defined __DragonFly__)
9
 #  define _SORT_R_BSD
10
 #elif (defined _GNU_SOURCE || defined __gnu_hurd__ || defined __GNU__ || \
11
-       defined __linux__ || (defined __MINGW32__ && !defined __MINGW64_VERSION_MAJOR) || defined __GLIBC__)
12
+       defined __linux__ || (defined __MINGW32__ && !defined __MINGW64_VERSION_MAJOR) || defined __GLIBC__ || (defined (__FreeBSD__) && defined(qsort_r)))
13
 #  define _SORT_R_LINUX
14
 #elif (defined _WIN32 || defined _WIN64 || defined __WINDOWS__)
15
 #  define _SORT_R_WINDOWS
16
@@ -170,7 +170,7 @@ static _SORT_R_INLINE void sort_r_simple(void *base, s
17
   #if defined _SORT_R_LINUX
18
 
19
     typedef int(* __compar_d_fn_t)(const void *, const void *, void *);
20
-    extern void qsort_r(void *base, size_t nel, size_t width,
21
+    extern void (qsort_r)(void *base, size_t nel, size_t width,
22
                         __compar_d_fn_t __compar, void *arg)
23
       __attribute__((nonnull (1, 4)));
24
 

Return to bug 266227