Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Sep 2022 22:30:01 GMT
From:      Xin LI <delphij@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 7df902171f69 - main - databases/ejdb: unbreak on -CURRENT after GNU qsort_r
Message-ID:  <202209302230.28UMU1EG021286@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by delphij:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7df902171f69003e364e23feefc7d15e4aa97ed4

commit 7df902171f69003e364e23feefc7d15e4aa97ed4
Author:     Xin LI <delphij@FreeBSD.org>
AuthorDate: 2022-09-30 20:45:51 +0000
Commit:     Xin LI <delphij@FreeBSD.org>
CommitDate: 2022-09-30 22:28:06 +0000

    databases/ejdb: unbreak on -CURRENT after GNU qsort_r
    
    PR:             266227
    Exp-run by:     antoine
    Approved by:    portmgr
---
 databases/ejdb/files/patch-src_util_sort__r.h | 34 +++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/databases/ejdb/files/patch-src_util_sort__r.h b/databases/ejdb/files/patch-src_util_sort__r.h
new file mode 100644
index 000000000000..099d67ade3bb
--- /dev/null
+++ b/databases/ejdb/files/patch-src_util_sort__r.h
@@ -0,0 +1,34 @@
+--- src/util/sort_r.h.orig	2022-02-23 10:00:23 UTC
++++ src/util/sort_r.h
+@@ -25,10 +25,11 @@
+ #define _SORT_R_INLINE inline
+ 
+ #if (  defined __APPLE__ || defined __MACH__ || defined __DARWIN__    \
+-    || defined __FreeBSD__ || defined __DragonFly__) && defined JB_HAVE_QSORT_R
++    || (defined __FreeBSD__ && !defined(qsort_r)) || defined __DragonFly__) && defined JB_HAVE_QSORT_R
+ #  define _SORT_R_BSD
+ #elif (  defined _GNU_SOURCE || defined __gnu_hurd__ || defined __GNU__    \
+-      || defined __linux__ || defined __MINGW32__ || defined __GLIBC__) && defined JB_HAVE_QSORT_R
++      || defined __linux__ || defined __MINGW32__ || defined __GLIBC__ \
++      || (defined (__FreeBSD__) && defined(qsort_r))) && defined JB_HAVE_QSORT_R
+ #  define _SORT_R_LINUX
+ #elif (defined _WIN32 || defined _WIN64 || defined __WINDOWS__)
+ #  define _SORT_R_WINDOWS
+@@ -255,7 +256,7 @@ static _SORT_R_INLINE void sort_r(
+   #if defined _SORT_R_BSD
+ 
+ /* Ensure qsort_r is defined */
+-extern void qsort_r(
++extern void (qsort_r)(
+   void *base, size_t nel, size_t width, void *thunk,
+   int (*compar)(void *_thunk,
+                 const void *_a, const void *_b));
+@@ -283,7 +284,7 @@ typedef int (*__compar_d_fn_t)(const void*, const void
+   #if defined _SORT_R_LINUX
+ 
+ typedef int (*__compar_d_fn_t)(const void*, const void*, void*);
+-extern void qsort_r(
++extern void (qsort_r)(
+   void *base, size_t nel, size_t width,
+   __compar_d_fn_t __compar, void *arg)
+ __attribute__((nonnull(1, 4)));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202209302230.28UMU1EG021286>