]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
daemon/worker: malloc.h is not present on OS X
authorMarek Vavruša <marek.vavrusa@nic.cz>
Wed, 10 Jun 2015 00:36:09 +0000 (02:36 +0200)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Wed, 10 Jun 2015 00:36:09 +0000 (02:36 +0200)
daemon/worker.c

index 2f96a8a0ee9c9619264b77b60bea9e0fa1b12e8f..993f9d1ccb1cdf258bf539391c0e76ba08269d98 100644 (file)
@@ -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) {