From fbed23421fe867d76e6123d2cf79ffafeed5aafd Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Thu, 12 Jul 2018 02:14:48 +0200 Subject: libcompat: Add new strchrnul() compat function --- lib/compat/compat.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/compat/compat.h') diff --git a/lib/compat/compat.h b/lib/compat/compat.h index 320ffdbc9..c1aa60180 100644 --- a/lib/compat/compat.h +++ b/lib/compat/compat.h @@ -109,6 +109,8 @@ extern "C" { #define asprintf test_asprintf #undef vasprintf #define vasprintf test_vasprintf +#undef strchrnul +#define strchrnul test_strchrnul #undef strndup #define strndup test_strndup #undef strnlen @@ -139,6 +141,10 @@ int vasprintf(char **str, const char *fmt, va_list args) LIBCOMPAT_ATTR_VPRINTF(2); #endif +#if TEST_LIBCOMPAT || !defined(HAVE_STRCHRNUL) +char *strchrnul(const char *s, int c); +#endif + #if TEST_LIBCOMPAT || !defined(HAVE_STRNLEN) size_t strnlen(const char *s, size_t n); #endif -- cgit v1.2.3