From 19b4baa1fb1f0f9e90784fd416211d5db0e6460f Mon Sep 17 00:00:00 2001 From: barracuda156 Date: Sun, 6 Aug 2023 16:01:57 +0800 Subject: [PATCH 1/3] Fix build with Apple clang Fixes: https://github.com/hrs-allbsd/spegla/issues/2 Apple headers conflict here. See: https://github.com/greenplum-db/gpdb/commit/ca7608915e6caaa2a06b727b7f93e154b0abf88d --- strlcat.c | 2 ++ strlcpy.c | 2 ++ 2 files changed, 4 insertions(+) diff --git strlcat.c strlcat.c index a2ce616..4b83459 100644 --- strlcat.c +++ strlcat.c @@ -31,6 +31,7 @@ #include #include +#if !(defined(__APPLE__) && defined(__clang__)) /* * Appends src to string dst of size siz (unlike strncat, siz is the * full size of dst, not space left). At most siz-1 characters @@ -66,3 +67,4 @@ size_t strlcat(dst, src, siz) return(dlen + (s - src)); /* count does not include NUL */ } +#endif diff --git strlcpy.c strlcpy.c index 3527f0f..b5d8ab0 100644 --- strlcpy.c +++ strlcpy.c @@ -33,6 +33,7 @@ #include "strlcpy.h" +#if !(defined(__APPLE__) && defined(__clang__)) /* * Copy src to string dst of size siz. At most siz-1 characters * will be copied. Always NUL terminates (unless siz == 0). @@ -65,3 +66,4 @@ size_t strlcpy(dst, src, siz) return(s - src - 1); /* count does not include NUL */ } +#endif -- 2.41.0