From a68fe6acd074730372533a383360f7f7303792b7 Mon Sep 17 00:00:00 2001 From: Stian Skjelstad Date: Sun, 30 Jul 2023 17:34:55 +0200 Subject: [PATCH] We experienced that some combination of Haiku + nCurses ends up with header files that defines memmem (as non-static), but no memmem implementation in the provided libc (libgnu might provide it) so redirect memmem to ocp_memmem. --- config.h.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config.h.in b/config.h.in index 0a76a6c9..d0b09259 100644 --- a/config.h.in +++ b/config.h.in @@ -394,6 +394,13 @@ extern "C" { # endif +/* We experienced that some combination of Haiku + nCurses ends up with header + * files that defines memmem (as non-static), but no memmem implementation in + * the provided libc (libgnu might provide it) so redirect memmem to ocp_memmem + */ +#undef memmem +#define memmem ocp_memmem + static inline void *memmem(const void *_haystack, size_t haystacklen, const void *needle, size_t needlelen) {