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"