From fe41932b1a52a48de642065aac04668b8b7bd05b Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Thu, 6 Jun 2019 02:59:57 -0700 Subject: [PATCH] ircd: Add #ifdefs around potentially conflicting BSD stringops. --- include/ircd/stringops.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/ircd/stringops.h b/include/ircd/stringops.h index af18aed3b..96abd514b 100644 --- a/include/ircd/stringops.h +++ b/include/ircd/stringops.h @@ -146,9 +146,11 @@ struct ircd::strlcpy }()} {} + #ifndef HAVE_STRLCPY strlcpy(char *const &dst, const char *const &src, const size_t &max) :strlcpy{dst, string_view{src, strnlen(src, max)}, max} {} + #endif strlcpy(const mutable_buffer &dst, const string_view &src) :strlcpy{data(dst), src, size(dst)} @@ -184,9 +186,11 @@ struct ircd::strlcat }()} {} + #ifndef HAVE_STRLCAT strlcat(char *const &dst, const char *const &src, const size_t &max) :strlcat{dst, string_view{src, ::strnlen(src, max)}, max} {} + #endif strlcat(const mutable_buffer &dst, const string_view &src) :strlcat{data(dst), src, size(dst)}