Fix compilation on DragonFly BSD

This commit is contained in:
Cacodemon345 2020-06-10 13:13:07 +00:00 committed by alexey.lysiuk
parent 60a20af8ff
commit 20381a5929
4 changed files with 4 additions and 4 deletions

View file

@ -14,7 +14,7 @@
#include <errno.h>
#include <stdarg.h>
#include <signal.h>
#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__)
#include <malloc.h>
#endif
#include <time.h>

View file

@ -2229,7 +2229,7 @@ remove them if not needed.
#include <mutex> // for std::mutex
#include <atomic> // for std::atomic
#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__)
#include <malloc.h> // for aligned_alloc()
#endif

View file

@ -38,7 +38,7 @@
#elif defined(__APPLE__)
#include <stdlib.h>
#include <malloc/malloc.h>
#elif defined(__OpenBSD__)
#elif defined(__OpenBSD__) || defined(__DragonFly__)
#include <stdlib.h>
#else
#include <malloc.h>

View file

@ -40,7 +40,7 @@
#if defined(__APPLE__)
#include <malloc/malloc.h>
#define _msize(p) malloc_size(p)
#elif defined(__solaris__) || defined(__OpenBSD__)
#elif defined(__solaris__) || defined(__OpenBSD__) || defined(__DragonFly__)
#define _msize(p) (*((size_t*)(p)-1))
#elif !defined(_WIN32)
#include <malloc.h>