aboutsummaryrefslogtreecommitdiff
path: root/databases/iowow
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2022-09-30 20:40:29 +0000
committerXin LI <delphij@FreeBSD.org>2022-09-30 22:28:04 +0000
commit764565249f6d4df63e65373b696037b9a43ef14e (patch)
tree701e4f3777696f70a24bf01f61f5108a8bd0b5f2 /databases/iowow
parenta7c48b30a0ac7dac2ecf8d4dc3acdf5c5c02c452 (diff)
downloadports-764565249f6d4df63e65373b696037b9a43ef14e.tar.gz
ports-764565249f6d4df63e65373b696037b9a43ef14e.zip
databases/iowow: unbreak on -CURRENT after GNU qsort_r
PR: ports/266227 Exp-run by: antoine Approved by: portmgr
Diffstat (limited to 'databases/iowow')
-rw-r--r--databases/iowow/files/patch-src_utils_sort__r.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/databases/iowow/files/patch-src_utils_sort__r.h b/databases/iowow/files/patch-src_utils_sort__r.h
new file mode 100644
index 000000000000..3577a97bf4cc
--- /dev/null
+++ b/databases/iowow/files/patch-src_utils_sort__r.h
@@ -0,0 +1,25 @@
+--- src/utils/sort_r.h.orig 2022-02-14 12:24:37 UTC
++++ src/utils/sort_r.h
+@@ -25,10 +25,11 @@
+ #define _SORT_R_INLINE inline
+
+ #if ( defined __APPLE__ || defined __MACH__ || defined __DARWIN__ \
+- || defined __FreeBSD__ || defined __DragonFly__) && defined IW_HAVE_QSORT_R
++ || (defined __FreeBSD__ && !defined(qsort_r)) || defined __DragonFly__) && defined IW_HAVE_QSORT_R
+ # define _SORT_R_BSD
+ #elif ( defined _GNU_SOURCE || defined __gnu_hurd__ || defined __GNU__ \
+- || defined __linux__ || defined __MINGW32__ || defined __GLIBC__) && defined IW_HAVE_QSORT_R
++ || defined __linux__ || defined __MINGW32__ || defined __GLIBC__ \
++ || (defined (__FreeBSD__) && defined(qsort_r))) && defined IW_HAVE_QSORT_R
+ # define _SORT_R_LINUX
+ #elif (defined _WIN32 || defined _WIN64 || defined __WINDOWS__)
+ # define _SORT_R_WINDOWS
+@@ -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)));