From b61245b795d4e4dc39277f583b6c50d494fc4931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Rolim?= Date: Sun, 24 Jan 2021 16:50:37 -0300 Subject: [PATCH] dante: fix runtime on musl. musl implements the sched_{set,get}scheduler functions as stubs. Unfortunately, dante fails if the functions are available but return an error, which is always the case for musl. Force it to think setscheduler isn't available (var appropriated from Alpine). Also fix their m4 stuff to search for sched_setaffinity properly (needs _GNU_SOURCE on musl). That functions is implemented completely by musl. Fixes #28180 --- .../patches/musl-detect-sched_setaffinity.patch | 12 ++++++++++++ srcpkgs/dante/template | 4 +++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/dante/patches/musl-detect-sched_setaffinity.patch diff --git a/srcpkgs/dante/patches/musl-detect-sched_setaffinity.patch b/srcpkgs/dante/patches/musl-detect-sched_setaffinity.patch new file mode 100644 index 00000000000..87c784a40bf --- /dev/null +++ b/srcpkgs/dante/patches/musl-detect-sched_setaffinity.patch @@ -0,0 +1,12 @@ +diff --git libscompat.m4 libscompat.m4 +index 913e9e5..03f0a64 100644 +--- libscompat.m4 ++++ libscompat.m4 +@@ -103,6 +103,7 @@ AC_CHECK_FUNC(getpassphrase, + + AC_MSG_CHECKING([for sched_setaffinity]) + AC_TRY_COMPILE([ ++#define _GNU_SOURCE + #include + ], + [ cpu_set_t set1; diff --git a/srcpkgs/dante/template b/srcpkgs/dante/template index 44e08fd6ab1..17fe0f69ae6 100644 --- a/srcpkgs/dante/template +++ b/srcpkgs/dante/template @@ -1,7 +1,7 @@ # Template file for 'dante' pkgname=dante version=1.4.2 -revision=3 +revision=4 build_style=gnu-configure hostmakedepends="tar automake libtool" short_desc="SOCKS server and client" @@ -13,6 +13,8 @@ checksum=4c97cff23e5c9b00ca1ec8a95ab22972813921d7fbf60fc453e3e06382fc38a7 if [ "$XBPS_TARGET_LIBC" = "glibc" ]; then configure_args="--with-libc=libc.so.6" +else + configure_args="ac_cv_func_sched_setscheduler=no" fi pre_configure() {