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).
This commit is contained in:
Dmitry Podgorny
2021-03-23 00:30:09 +02:00
parent ecf6457cdb
commit cf2f7147d9

View File

@@ -34,6 +34,7 @@ void xmpp_free(const xmpp_ctx_t *ctx, void *p)
(void)p; (void)p;
} }
#ifndef HAVE_SNPRINTF
int xmpp_snprintf(char *str, size_t count, const char *fmt, ...) int xmpp_snprintf(char *str, size_t count, const char *fmt, ...)
{ {
(void)str; (void)str;
@@ -41,6 +42,7 @@ int xmpp_snprintf(char *str, size_t count, const char *fmt, ...)
(void)fmt; (void)fmt;
return 0; return 0;
} }
#endif /* HAVE_SNPRINTF */
uint64_t time_stamp(void) uint64_t time_stamp(void)
{ {