Fix FreeBSD build: include malloc.h only when a macro HAVE_MALLOC_H defined
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
#include <stdlib.h>
|
||||
#if !defined(__APPLE__)
|
||||
#ifdef HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
@@ -35,9 +35,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/* FreeBSD's malloc.h is deprecated, it drops a warning and */
|
||||
/* #includes <stdlib.h>, which is already here. */
|
||||
#if !defined(__FreeBSD__) && !defined(__APPLE__)
|
||||
#ifdef HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
|
@@ -49,7 +49,7 @@
|
||||
|
||||
/* ANSI C Library headers */
|
||||
|
||||
#if !defined(__FreeBSD__) && !defined(__APPLE__)
|
||||
#ifdef HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user