Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1diff --git a/libhashkit/fnv_64.cc b/libhashkit/fnv_64.cc 2index 68e4dd0..64656b7 100644 3--- a/libhashkit/fnv_64.cc 4+++ b/libhashkit/fnv_64.cc 5@@ -37,8 +37,9 @@ 6 7 8 #include <libhashkit/common.h> 9+#include <limits.h> 10 11-#if __WORDSIZE == 64 && defined(HAVE_FNV64_HASH) 12+#if (LONG_BITS == 64) && defined(HAVE_FNV64_HASH) 13 14 /* FNV hash'es lifted from Dustin Sallings work */ 15 static uint64_t FNV_64_INIT= 0xcbf29ce484222325; 16diff --git a/libhashkit/has.cc b/libhashkit/has.cc 17index 843e32e..4153e5e 100644 18--- a/libhashkit/has.cc 19+++ b/libhashkit/has.cc 20@@ -37,6 +37,7 @@ 21 22 23 #include <libhashkit/common.h> 24+#include <limits.h> 25 26 bool libhashkit_has_algorithm(const hashkit_hash_algorithm_t algo) 27 { 28@@ -44,7 +45,7 @@ bool libhashkit_has_algorithm(const hashkit_hash_algorithm_t algo) 29 { 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; 37diff --git a/libtest/cmdline.cc b/libtest/cmdline.cc 38index 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> 44 45-#ifndef __USE_GNU 46+#ifndef _GNU_SOURCE 47 static char **environ= NULL; 48 #endif 49 50@@ -201,7 +201,7 @@ Application::error_t Application::run(const char *args[]) 51 52 fatal_assert(posix_spawnattr_setsigmask(&spawnattr, &mask) == 0); 53 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