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