diff options
author | Claes Nästén <pekdon@gmail.com> | 2021-12-06 07:49:15 +0100 |
---|---|---|
committer | Claes Nästén <pekdon@gmail.com> | 2021-12-06 17:34:26 +0100 |
commit | 8f1fdbc54a873abc7375c785b2b6ee5440910de2 (patch) | |
tree | 3d2d70542b1b87a48d56252c25d6c0b15db83b41 /src/nvim/api/private/helpers.c | |
parent | 8fdf1b265d982b80bfa8e6d98374514ece20a03e (diff) | |
download | rneovim-8f1fdbc54a873abc7375c785b2b6ee5440910de2.tar.gz rneovim-8f1fdbc54a873abc7375c785b2b6ee5440910de2.tar.bz2 rneovim-8f1fdbc54a873abc7375c785b2b6ee5440910de2.zip |
fix: add STRNLEN compatability macro
Older SunOS systems come without strnlen, add STRNLEN macro in line with
the other str* compat macros.
Diffstat (limited to 'src/nvim/api/private/helpers.c')
-rw-r--r-- | src/nvim/api/private/helpers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c index d470def277..9b407eab8b 100644 --- a/src/nvim/api/private/helpers.c +++ b/src/nvim/api/private/helpers.c @@ -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 |