mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 00:18:33 +00:00
fix: add STRNLEN compatability macro
Older SunOS systems come without strnlen, add STRNLEN macro in line with the other str* compat macros.
This commit is contained in:
@@ -513,7 +513,7 @@ String cbuf_to_string(const char *buf, size_t size)
|
||||
String cstrn_to_string(const char *str, size_t maxsize)
|
||||
FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
return cbuf_to_string(str, strnlen(str, maxsize));
|
||||
return cbuf_to_string(str, STRNLEN(str, maxsize));
|
||||
}
|
||||
|
||||
/// Creates a String using the given C string. Unlike
|
||||
|
Reference in New Issue
Block a user