diff options
author | Esteve Varela Colominas <esteve.varela@gmail.com> | 2022-02-14 09:09:12 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-02-18 02:50:48 +0000 |
commit | 8deac5a404bdca06ad8ece68baee944325e46c35 (patch) | |
tree | d60e20a2a4de74bae68da4bc0c483b6653f3b7cd /dev-libs/libdispatch/files | |
parent | gui-apps/grim: bump to 1.4.0 (diff) | |
download | gentoo-8deac5a404bdca06ad8ece68baee944325e46c35.tar.gz gentoo-8deac5a404bdca06ad8ece68baee944325e46c35.tar.bz2 gentoo-8deac5a404bdca06ad8ece68baee944325e46c35.zip |
dev-libs/libdispatch: Support musl
No revbump; patches don't affect existing built versions.
Closes: https://bugs.gentoo.org/829158
Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/24187
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/libdispatch/files')
-rw-r--r-- | dev-libs/libdispatch/files/libdispatch-5.3.3-musl.patch | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/dev-libs/libdispatch/files/libdispatch-5.3.3-musl.patch b/dev-libs/libdispatch/files/libdispatch-5.3.3-musl.patch new file mode 100644 index 000000000000..a162b34efc53 --- /dev/null +++ b/dev-libs/libdispatch/files/libdispatch-5.3.3-musl.patch @@ -0,0 +1,56 @@ +Fix building with musl libc + +https://github.com/apple/swift-corelibs-libdispatch/pull/594/ +https://bugs.gentoo.org/829158 +https://bugs.gentoo.org/833306 + +--- a/dispatch/source.h ++++ b/dispatch/source.h +@@ -32,7 +32,7 @@ + #endif + + #if !defined(_WIN32) +-#include <sys/signal.h> ++#include <signal.h> + #endif + + DISPATCH_ASSUME_NONNULL_BEGIN +--- a/os/generic_unix_base.h ++++ b/os/generic_unix_base.h +@@ -25,6 +25,14 @@ + + #if __has_include(<sys/cdefs.h>) + #include <sys/cdefs.h> ++#else ++#if defined(__cplusplus) ++#define __BEGIN_DECLS extern "C" { ++#define __END_DECLS } ++#else ++#define __BEGIN_DECLS ++#define __END_DECLS ++#endif + #endif + + #ifndef API_AVAILABLE +--- a/src/shims/getprogname.h ++++ b/src/shims/getprogname.h +@@ -37,7 +37,7 @@ + static inline char * + getprogname(void) + { +-# if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME ++# if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME || defined(__linux__) + return program_invocation_short_name; + # elif defined(__ANDROID__) + return __progname; +--- a/tests/dispatch_test.c ++++ b/tests/dispatch_test.c +@@ -34,7 +34,7 @@ + #define HAS_SYS_EVENT_H 1 + #include <sys/event.h> + #else +-#include <sys/poll.h> ++#include <poll.h> + #endif + #elif defined(_WIN32) + #include <Windows.h> |