Commit c78c9faf authored by Marek Vavruša's avatar Marek Vavruša

daemon/worker: malloc.h is not present on OS X

parent 9b600e68
......@@ -14,7 +14,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#if !defined(__APPLE__) && defined(_GNU_SOURCE)
#include <malloc.h>
#endif
#include <uv.h>
#include <libknot/packet/pkt.h>
#include <libknot/internal/net.h>
......@@ -138,7 +140,7 @@ static void qr_task_free(uv_handle_t *handle)
array_push(worker->pools, mp_context);
} else {
mp_delete(mp_context);
#ifdef _GNU_SOURCE
#if !defined(__APPLE__) && defined(_GNU_SOURCE)
/* Decommit memory every once in a while */
static int mp_delete_count = 0;
if (++mp_delete_count == 1000) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment