diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-10-29 09:31:48 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-10-29 09:31:48 (GMT) |
commit | ffe49ed60c9ee778b9999ee4145b44851b053f9f (patch) | |
tree | 075032d6ff99a4eb760a785544aa653fe7ffd00b /src/corelib/global | |
parent | 8307d3511b35adbb945948eda2cf54bbd3c0a20e (diff) | |
download | Qt-ffe49ed60c9ee778b9999ee4145b44851b053f9f.zip Qt-ffe49ed60c9ee778b9999ee4145b44851b053f9f.tar.gz Qt-ffe49ed60c9ee778b9999ee4145b44851b053f9f.tar.bz2 |
Fix compilation on Mac: there's no malloc.h there
Reviewed-by: Trust Me
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qmalloc.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/corelib/global/qmalloc.cpp b/src/corelib/global/qmalloc.cpp index e33f77c..3584c50 100644 --- a/src/corelib/global/qmalloc.cpp +++ b/src/corelib/global/qmalloc.cpp @@ -42,7 +42,10 @@ #include "qplatformdefs.h" #include <stdlib.h> -#include <malloc.h> + +#ifdef Q_OS_WIN +# include <malloc.h> +#endif /* Define the container allocation functions in a separate file, so that our @@ -66,10 +69,6 @@ void *qRealloc(void *ptr, size_t size) return ::realloc(ptr, size); } -#if ((defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600)) -# define HAVE_POSIX_MEMALIGN -#endif - void *qMallocAligned(size_t size, size_t alignment) { #if defined(Q_OS_WIN) |