From f72d450ae99927e7240f62900af4608a5db2d664 Mon Sep 17 00:00:00 2001 From: Peter Schlaile Date: Tue, 10 Jun 2008 05:12:51 +0000 Subject: == redcode == This makes it work for Mac OS X. Thanks to Jean-Luc Peuriere for the patch. --- extern/libopenjpeg/opj_malloc.h | 6 ++++-- extern/libopenjpeg/patches/osx.patch | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 extern/libopenjpeg/patches/osx.patch (limited to 'extern') diff --git a/extern/libopenjpeg/opj_malloc.h b/extern/libopenjpeg/opj_malloc.h index 79698f8ff1b..4e9727af0f3 100644 --- a/extern/libopenjpeg/opj_malloc.h +++ b/extern/libopenjpeg/opj_malloc.h @@ -76,8 +76,10 @@ Allocate memory aligned to a 16 byte boundry #if defined(__sun) #define HAVE_MEMALIGN #elif defined(__GNUC__) - #define HAVE_MEMALIGN - #include + #ifndef __APPLE__ + #define HAVE_MEMALIGN + #include + #endif /* Linux x86_64 and OSX always align allocations to 16 bytes */ #elif !defined(__amd64__) && !defined(__APPLE__) /* FIXME: Yes, this is a big assumption */ diff --git a/extern/libopenjpeg/patches/osx.patch b/extern/libopenjpeg/patches/osx.patch new file mode 100644 index 00000000000..c518978eed6 --- /dev/null +++ b/extern/libopenjpeg/patches/osx.patch @@ -0,0 +1,17 @@ +Index: opj_malloc.h +=================================================================== +--- opj_malloc.h (revision 15089) ++++ opj_malloc.h (working copy) +@@ -76,8 +76,10 @@ + #if defined(__sun) + #define HAVE_MEMALIGN + #elif defined(__GNUC__) +- #define HAVE_MEMALIGN +- #include ++ #ifndef __APPLE__ ++ #define HAVE_MEMALIGN ++ #include ++ #endif + /* Linux x86_64 and OSX always align allocations to 16 bytes */ + #elif !defined(__amd64__) && !defined(__APPLE__) + /* FIXME: Yes, this is a big assumption */ -- cgit v1.2.3