diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-02-05 09:10:56 +0100 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-02-05 09:10:56 +0100 |
commit | 48ae3fd97331bea275128d7ac2bdeb1d20b2f760 (patch) | |
tree | 1cf914a1366bb9884d74459c3c1812caeaafcfd2 | |
parent | 395be9a8fb85d172dcbb06826aed8b5b29ceeac2 (diff) | |
download | gnunet-48ae3fd97331bea275128d7ac2bdeb1d20b2f760.tar.gz gnunet-48ae3fd97331bea275128d7ac2bdeb1d20b2f760.zip |
make memrchr detection more general as some linux libcs such as musl or diet do not have memrchr either
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/include/compat.h | 3 | ||||
-rw-r--r-- | src/include/platform.h | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 4295ce0ba..3355812f6 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -192,6 +192,8 @@ AC_UNALIGNED_64_ACCESS | |||
192 | 192 | ||
193 | # some other checks for standard libs | 193 | # some other checks for standard libs |
194 | AC_SEARCH_LIBS([gethostbyname], [nsl ws2_32]) | 194 | AC_SEARCH_LIBS([gethostbyname], [nsl ws2_32]) |
195 | AC_SEARCH_LIBS([memrchr], [], [], | ||
196 | AC_DEFINE(HAVE_MEMRCHR,1,[memrchr supported])) | ||
195 | AC_CHECK_LIB(socket, socket) | 197 | AC_CHECK_LIB(socket, socket) |
196 | AC_CHECK_LIB(m, log) | 198 | AC_CHECK_LIB(m, log) |
197 | AC_CHECK_LIB(c, getloadavg, AC_DEFINE(HAVE_GETLOADAVG,1,[getloadavg supported])) | 199 | AC_CHECK_LIB(c, getloadavg, AC_DEFINE(HAVE_GETLOADAVG,1,[getloadavg supported])) |
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* | |||
44 | GN_memrchr_ (const void *s, | 44 | GN_memrchr_ (const void *s, |
45 | int c, | 45 | int c, |
46 | size_t n); | 46 | size_t n); |
47 | 47 | #ifndef HAVE_MEMRCHR | |
48 | #define memrchr(s,c,n) GN_memrchr_(s,c,n) | 48 | #define memrchr(s,c,n) GN_memrchr_(s,c,n) |
49 | #endif | ||
49 | 50 | ||
50 | #ifdef __cplusplus | 51 | #ifdef __cplusplus |
51 | } | 52 | } |
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 @@ | |||
70 | 70 | ||
71 | #define VERBOSE_STATS 0 | 71 | #define VERBOSE_STATS 0 |
72 | 72 | ||
73 | #if (defined WINDOWS) || (defined DARWIN) | ||
74 | #include "compat.h" | 73 | #include "compat.h" |
75 | #endif | ||
76 | 74 | ||
77 | #ifdef CYGWIN | 75 | #ifdef CYGWIN |
78 | #include <sys/reent.h> | 76 | #include <sys/reent.h> |