From 5bfbf62f06b2affc063c726516547ae46b860e3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Mu=CC=88ller?= Date: Fri, 16 Aug 2019 00:58:20 +0200 Subject: [PATCH] Guard inclusion of as to not break FreeBSD --- Source/Additions/NSObject+GNUstepBase.m | 2 ++ Source/NSDebug.m | 2 ++ Source/NSObject.m | 2 ++ 3 files changed, 6 insertions(+) diff --git a/Source/Additions/NSObject+GNUstepBase.m b/Source/Additions/NSObject+GNUstepBase.m index 5201895c8..f82d60cd7 100644 --- a/Source/Additions/NSObject+GNUstepBase.m +++ b/Source/Additions/NSObject+GNUstepBase.m @@ -31,7 +31,9 @@ #import "GNUstepBase/NSDebug+GNUstepBase.h" #import "GNUstepBase/NSThread+GNUstepBase.h" +#ifdef HAVE_MALLOC_H #include +#endif /* This file contains methods which nominally return an id but in fact * always rainse an exception and never return. diff --git a/Source/NSDebug.m b/Source/NSDebug.m index 0de65d890..86c2e3efb 100644 --- a/Source/NSDebug.m +++ b/Source/NSDebug.m @@ -48,7 +48,9 @@ #include #endif +#ifdef HAVE_MALLOC_H #include +#endif typedef struct { Class class; diff --git a/Source/NSObject.m b/Source/NSObject.m index 48358b5fb..bb933f9f6 100644 --- a/Source/NSObject.m +++ b/Source/NSObject.m @@ -53,7 +53,9 @@ #include #endif +#ifdef HAVE_MALLOC_H #include +#endif #import "GSPThread.h"