Fix malloc.h is deprecated warning on DragonFly BSD.
authorEdward O'Callaghan <eocallaghan@auroraux.org>
Mon, 2 Nov 2009 03:20:57 +0000 (03:20 +0000)
committerEdward O'Callaghan <eocallaghan@auroraux.org>
Mon, 2 Nov 2009 03:20:57 +0000 (03:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85782 91177308-0d34-0410-b5e6-96231b3b80d8

lib/System/Unix/Process.inc

index 94e4c1bde25c2ad46d4939272516838bf16fca7c..911b8c3258191366aeffd17ca40f8c92d16c339d 100644 (file)
@@ -18,7 +18,9 @@
 #ifdef HAVE_SYS_RESOURCE_H
 #include <sys/resource.h>
 #endif
-#ifdef HAVE_MALLOC_H
+// DragonFly BSD has deprecated <malloc.h> for <stdlib.h> instead,
+//  Unix.h includes this for us already.
+#if defined(HAVE_MALLOC_H) && !defined(__DragonFly__)
 #include <malloc.h>
 #endif
 #ifdef HAVE_MALLOC_MALLOC_H