From cde7d9c8b5adaa8f7a05c4e32b60668da4499525 Mon Sep 17 00:00:00 2001 From: Sven Eden Date: Thu, 25 Oct 2018 19:58:51 +0200 Subject: 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 a005d7eda..7f2dd6687 100644 --- a/cb/elogind.cbp +++ b/cb/elogind.cbp @@ -862,6 +862,10 @@