diff options
author | David Seifert <soap@gentoo.org> | 2021-08-08 12:46:27 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2021-08-08 12:46:27 +0200 |
commit | 035003465ec1e39f5017d9653f960bc3981ade32 (patch) | |
tree | 880b7fb7546f48f698df2e0bc94215e634b5ae43 /dev-libs/libmemcached | |
parent | x11-misc/shutter: version 0.98 (diff) | |
download | gentoo-035003465ec1e39f5017d9653f960bc3981ade32.tar.gz gentoo-035003465ec1e39f5017d9653f960bc3981ade32.tar.bz2 gentoo-035003465ec1e39f5017d9653f960bc3981ade32.zip |
dev-libs/libmemcached: fix musl
Closes: https://bugs.gentoo.org/713306
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'dev-libs/libmemcached')
-rw-r--r-- | dev-libs/libmemcached/files/libmemcached-1.0.18-musl.patch | 65 | ||||
-rw-r--r-- | dev-libs/libmemcached/libmemcached-1.0.18-r4.ebuild | 1 |
2 files changed, 66 insertions, 0 deletions
diff --git a/dev-libs/libmemcached/files/libmemcached-1.0.18-musl.patch b/dev-libs/libmemcached/files/libmemcached-1.0.18-musl.patch new file mode 100644 index 000000000000..06e802de64f6 --- /dev/null +++ b/dev-libs/libmemcached/files/libmemcached-1.0.18-musl.patch @@ -0,0 +1,65 @@ +Taken from alpine, with additional fixes +https://bugs.gentoo.org/713306 + +--- a/libhashkit/fnv_64.cc ++++ b/libhashkit/fnv_64.cc +@@ -37,8 +37,9 @@ + + + #include <libhashkit/common.h> ++#include <limits.h> + +-#if __WORDSIZE == 64 && defined(HAVE_FNV64_HASH) ++#if (LONG_BIT == 64) && defined(HAVE_FNV64_HASH) + + /* FNV hash'es lifted from Dustin Sallings work */ + static uint64_t FNV_64_INIT= 0xcbf29ce484222325; +--- a/libhashkit/has.cc ++++ b/libhashkit/has.cc +@@ -37,6 +37,7 @@ + + + #include <libhashkit/common.h> ++#include <limits.h> + + bool libhashkit_has_algorithm(const hashkit_hash_algorithm_t algo) + { +@@ -44,7 +45,7 @@ + { + case HASHKIT_HASH_FNV1_64: + case HASHKIT_HASH_FNV1A_64: +-#if __WORDSIZE == 64 && defined(HAVE_FNV64_HASH) ++#if (LONG_BIT == 64) && defined(HAVE_FNV64_HASH) + return true; + #else + return false; +--- a/libmemcachedutil/pool.cc ++++ b/libmemcachedutil/pool.cc +@@ -42,6 +42,7 @@ + #include <cerrno> + #include <pthread.h> + #include <memory> ++#include <string.h> + + struct memcached_pool_st + { +--- a/libtest/cmdline.cc ++++ b/libtest/cmdline.cc +@@ -61,7 +61,7 @@ + #include <algorithm> + #include <stdexcept> + +-#ifndef __USE_GNU ++#ifndef _GNU_SOURCE + static char **environ= NULL; + #endif + +@@ -201,7 +201,7 @@ + + fatal_assert(posix_spawnattr_setsigmask(&spawnattr, &mask) == 0); + +-#if defined(POSIX_SPAWN_USEVFORK) || defined(__linux__) ++#if defined(POSIX_SPAWN_USEVFORK) || defined(__GLIBC__) + // Use USEVFORK on linux + flags |= POSIX_SPAWN_USEVFORK; + #endif diff --git a/dev-libs/libmemcached/libmemcached-1.0.18-r4.ebuild b/dev-libs/libmemcached/libmemcached-1.0.18-r4.ebuild index 9033195b21fb..213043a11dc1 100644 --- a/dev-libs/libmemcached/libmemcached-1.0.18-r4.ebuild +++ b/dev-libs/libmemcached/libmemcached-1.0.18-r4.ebuild @@ -29,6 +29,7 @@ PATCHES=( "${FILESDIR}"/${P}-gcc7.patch "${FILESDIR}"/${P}-autotools.patch "${FILESDIR}"/${P}-disable-sphinx.patch + "${FILESDIR}"/${P}-musl.patch ) src_prepare() { |