Package: zam-plugins Version: 3.6~repack2-3 Severity: important Tags: patch User: debian-bsd@lists.debian.org Usertags: kfreebsd
Hi, zam-plugins stopped building on kfreebsd and hurd due to some platform-detection code that doesn't know about GNU/kFreeBSD or Hurd. I suggest it treats those as Linux because the macros don't enable kernel-specific features anyway, just decide whether to include certain headers. Please see attached patch fixing this. Thanks! -- System Information: Debian Release: stretch/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: kfreebsd-amd64 (x86_64) Kernel: kFreeBSD 10.1-0-amd64 Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
Date: Tue, 05 Apr 2016 21:37:17 +0100 From: Steven Chamberlain <ste...@pyro.eu.org> Subject: distrho: support GNU platforms other than Linux Treat all glibc-based platforms as DISTRHO_OS_LINUX, even those not based on Linux such as GNU/kFreeBSD or GNU/Hurd. Also, wrap ifdefs around sa_restorer which really is specific to (some) Linux platforms. (A feature-test macro would be better, though it is obsolete and maybe should be removed altogether...) --- a/dpf/distrho/src/DistrhoDefines.h +++ b/dpf/distrho/src/DistrhoDefines.h @@ -37,7 +37,7 @@ # define DISTRHO_DLL_EXTENSION "dylib" # elif defined(__HAIKU__) # define DISTRHO_OS_HAIKU 1 -# elif defined(__linux__) +# elif defined(__linux__) || defined(__GLIBC__) # define DISTRHO_OS_LINUX 1 # endif #endif --- a/dpf/distrho/src/DistrhoPluginJack.cpp +++ b/dpf/distrho/src/DistrhoPluginJack.cpp @@ -75,13 +75,17 @@ sint.sa_handler = closeSignalHandler; sint.sa_flags = SA_RESTART; +#if defined(__linux__) sint.sa_restorer = nullptr; +#endif sigemptyset(&sint.sa_mask); sigaction(SIGINT, &sint, nullptr); sterm.sa_handler = closeSignalHandler; sterm.sa_flags = SA_RESTART; +#if defined(__linux__) sterm.sa_restorer = nullptr; +#endif sigemptyset(&sterm.sa_mask); sigaction(SIGTERM, &sterm, nullptr); }