Package: performous / 1.1+git20190701.9928c27-3

fix-hurd-kfreebsd-build.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Description: fix memrchr detection
Author: mirabilos <tg@debian.org>
Forwarded: https://github.com/performous/compact_enc_det/pull/3

--- a/ced/util/string_util.h
+++ b/ced/util/string_util.h
@@ -41,7 +41,13 @@ inline int strncasecmp(const char* s1, c
 #endif
 }
 
-#if !defined(__linux__)
+#ifndef HAVE_MEMRCHR
+#if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 2)))
+#define HAVE_MEMRCHR
+#endif
+#endif
+
+#ifndef HAVE_MEMRCHR
 inline void* memrchr(const void* s, int c, size_t n) {
   const unsigned char* p = (const unsigned char*) s;
   for (p += n; n > 0; n--) {