diff options
Diffstat (limited to 'src/common/memrchr.h')
| -rw-r--r-- | src/common/memrchr.h | 15 |
1 files changed, 15 insertions, 0 deletions
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 <stddef.h> + +#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 |