From cf2f7147d9404953411239df7f80e34d81b8b96c Mon Sep 17 00:00:00 2001 From: Dmitry Podgorny Date: Tue, 23 Mar 2021 00:30:09 +0200 Subject: [PATCH] tests/rand: don't define xmpp_snprintf when HAVE_SNPRINTF is set If HAVE_SNPRINTF is set, xmpp_snprintf is replaced with snprintf symbol and it can cause issues (e.g. on MacOS system). --- tests/test_rand.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_rand.c b/tests/test_rand.c index 6f04551..19c47fb 100644 --- a/tests/test_rand.c +++ b/tests/test_rand.c @@ -34,6 +34,7 @@ void xmpp_free(const xmpp_ctx_t *ctx, void *p) (void)p; } +#ifndef HAVE_SNPRINTF int xmpp_snprintf(char *str, size_t count, const char *fmt, ...) { (void)str; @@ -41,6 +42,7 @@ int xmpp_snprintf(char *str, size_t count, const char *fmt, ...) (void)fmt; return 0; } +#endif /* HAVE_SNPRINTF */ uint64_t time_stamp(void) {