From 48ae3fd97331bea275128d7ac2bdeb1d20b2f760 Mon Sep 17 00:00:00 2001 From: "Schanzenbach, Martin" Date: Tue, 5 Feb 2019 09:10:56 +0100 Subject: make memrchr detection more general as some linux libcs such as musl or diet do not have memrchr either --- src/include/compat.h | 3 ++- src/include/platform.h | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src/include') diff --git a/src/include/compat.h b/src/include/compat.h index 31a9760c5..b24d09653 100644 --- a/src/include/compat.h +++ b/src/include/compat.h @@ -44,8 +44,9 @@ void* GN_memrchr_ (const void *s, int c, size_t n); - +#ifndef HAVE_MEMRCHR #define memrchr(s,c,n) GN_memrchr_(s,c,n) +#endif #ifdef __cplusplus } diff --git a/src/include/platform.h b/src/include/platform.h index b0a7c0a47..6ea70dc6c 100644 --- a/src/include/platform.h +++ b/src/include/platform.h @@ -70,9 +70,7 @@ #define VERBOSE_STATS 0 -#if (defined WINDOWS) || (defined DARWIN) #include "compat.h" -#endif #ifdef CYGWIN #include -- cgit v1.2.3