From 887b67908d0e6a2b2f50e04319c1cf4412a25f89 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 25 Oct 2019 00:16:21 +0200 Subject: Add libutil implementation for strndup in case it isn't available "Some" "non-POSIX systems" don't have that. Signed-off-by: David Oberhollenzer --- include/util/compat.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/util/compat.h b/include/util/compat.h index d69a1de..8566090 100644 --- a/include/util/compat.h +++ b/include/util/compat.h @@ -110,4 +110,8 @@ struct stat { #include #endif +#ifndef HAVE_STRNDUP +char *strndup(const char *str, size_t max_len); +#endif + #endif /* COMPAT_H */ -- cgit v1.2.3