python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / libraries / libmemcached / musl-fixes.patch
blobeb2a6bc980eb2e94b5548aea6b86e4ef77e1c57a
1 diff --git a/libhashkit/fnv_64.cc b/libhashkit/fnv_64.cc
2 index 68e4dd0..64656b7 100644
3 --- a/libhashkit/fnv_64.cc
4 +++ b/libhashkit/fnv_64.cc
5 @@ -37,8 +37,9 @@
8 #include <libhashkit/common.h>
9 +#include <limits.h>
11 -#if __WORDSIZE == 64 && defined(HAVE_FNV64_HASH)
12 +#if (LONG_BITS == 64) && defined(HAVE_FNV64_HASH)
14 /* FNV hash'es lifted from Dustin Sallings work */
15 static uint64_t FNV_64_INIT= 0xcbf29ce484222325;
16 diff --git a/libhashkit/has.cc b/libhashkit/has.cc
17 index 843e32e..4153e5e 100644
18 --- a/libhashkit/has.cc
19 +++ b/libhashkit/has.cc
20 @@ -37,6 +37,7 @@
23 #include <libhashkit/common.h>
24 +#include <limits.h>
26 bool libhashkit_has_algorithm(const hashkit_hash_algorithm_t algo)
28 @@ -44,7 +45,7 @@ bool libhashkit_has_algorithm(const hashkit_hash_algorithm_t algo)
30 case HASHKIT_HASH_FNV1_64:
31 case HASHKIT_HASH_FNV1A_64:
32 -#if __WORDSIZE == 64 && defined(HAVE_FNV64_HASH)
33 +#if (LONG_BITS == 64) && defined(HAVE_FNV64_HASH)
34 return true;
35 #else
36 return false;
37 diff --git a/libtest/cmdline.cc b/libtest/cmdline.cc
38 index 29a22de..161c646 100644
39 --- a/libtest/cmdline.cc
40 +++ b/libtest/cmdline.cc
41 @@ -61,7 +61,7 @@ using namespace libtest;
42 #include <algorithm>
43 #include <stdexcept>
45 -#ifndef __USE_GNU
46 +#ifndef _GNU_SOURCE
47 static char **environ= NULL;
48 #endif
50 @@ -201,7 +201,7 @@ Application::error_t Application::run(const char *args[])
52 fatal_assert(posix_spawnattr_setsigmask(&spawnattr, &mask) == 0);
54 -#if defined(POSIX_SPAWN_USEVFORK) || defined(__linux__)
55 +#if defined(POSIX_SPAWN_USEVFORK) || defined(__GLIBC__)
56 // Use USEVFORK on linux
57 flags |= POSIX_SPAWN_USEVFORK;
58 #endif