Fix memory tracking not being available on FreeBSD or macOS.

Closes #2096. Thanks to blusewang.
This commit is contained in:
Roger A. Light
2021-02-25 17:04:15 +00:00
parent 12ff9d5e14
commit 2190e98b20
2 changed files with 5 additions and 2 deletions
+1
View File
@@ -7,6 +7,7 @@ Broker:
plugin should not be accessing them.
- Give compile time warning if libwebsockets compiled without external poll
support. Closes #2060.
- Fix memory tracking not being available on FreeBSD or macOS. Closes #2096.
Client library:
- Fix mosquitto_{pub|sub}_topic_check() functions not returning MOSQ_ERR_INVAL
+4 -2
View File
@@ -22,8 +22,10 @@ Contributors:
#include <stdio.h>
#include <sys/types.h>
#if defined(WITH_MEMORY_TRACKING) && defined(WITH_BROKER) && defined(__GLIBC__)
#define REAL_WITH_MEMORY_TRACKING
#if defined(WITH_MEMORY_TRACKING) && defined(WITH_BROKER)
# if defined(__APPLE__) || defined(__FreeBSD__) || defined(__GLIBC__)
# define REAL_WITH_MEMORY_TRACKING
# endif
#endif
void *mosquitto__calloc(size_t nmemb, size_t size);