From 76424950e373d3b04ac3dd13019151bfba3e8423 Mon Sep 17 00:00:00 2001 From: sumuel Date: Mon, 17 Aug 2026 20:44:55 +0000 Subject: Add the files --- src/common/memrchr.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/common/memrchr.h (limited to 'src/common/memrchr.h') diff --git a/src/common/memrchr.h b/src/common/memrchr.h new file mode 100644 index 0000000..6905a33 --- /dev/null +++ b/src/common/memrchr.h @@ -0,0 +1,15 @@ +#pragma once + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +// `memrchr` is a GNU extension and may not be declared by system headers even when the symbol exists. +// Declare it unconditionally; the build system provides a fallback implementation when missing. +void* memrchr(const void* s, int c, size_t n); + +#ifdef __cplusplus +} +#endif -- cgit v1.2.3