From f2c9a0d5e9d246fdfacd698a5e2b79c86eaa7779 Mon Sep 17 00:00:00 2001 From: Sven Eden Date: Thu, 25 Oct 2018 19:58:51 +0200 Subject: [PATCH] Prep v240: Add check for qsort_r() and the function if not provided. As elogind supports musl-libc, we have to remedy the situation that upstream decided to make use of qsort_r(). This function is not provided by musl-libc, so we have to provide an own variant. The variant is an adaption of the qsort_r() algorithm found in glibc-2.28, the disclaimer from their source files have been added. Bug: #83 Signed-off-by: Sven Eden --- cb/elogind.cbp | 4 + meson.build | 3 + src/shared/meson.build | 2 + src/shared/musl_missing.h | 3 +- src/shared/qsort_r_missing.c | 499 +++++++++++++++++++++++++++++++++++ src/shared/qsort_r_missing.h | 34 +++ 6 files changed, 544 insertions(+), 1 deletion(-) create mode 100644 src/shared/qsort_r_missing.c create mode 100644 src/shared/qsort_r_missing.h diff --git a/cb/elogind.cbp b/cb/elogind.cbp index cebc32676..fdffbfc15 100644 --- cb/elogind.cbp +++ cb/elogind.cbp @@ -891,6 +891,10 @@