summaryrefslogtreecommitdiffstats
path: root/src/openexr-1-fix-aligned-alloc.patch
diff options
context:
space:
mode:
authorMartin Lambers <marlam@marlam.de>2015-01-07 14:48:56 (GMT)
committerMartin Lambers <marlam@marlam.de>2015-01-25 14:18:41 (GMT)
commitfd70d8abab208054d1cec3e8881075abe8176fe6 (patch)
tree1e94e3f0e35041f9df5eed3826927003aabb6db1 /src/openexr-1-fix-aligned-alloc.patch
parent441ff601976ac96e5fd739650a07b2a635423273 (diff)
downloadmxe-fd70d8abab208054d1cec3e8881075abe8176fe6.zip
mxe-fd70d8abab208054d1cec3e8881075abe8176fe6.tar.gz
mxe-fd70d8abab208054d1cec3e8881075abe8176fe6.tar.bz2
openexr: fix 64 bit build and build failure
Diffstat (limited to 'src/openexr-1-fix-aligned-alloc.patch')
-rw-r--r--src/openexr-1-fix-aligned-alloc.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/openexr-1-fix-aligned-alloc.patch b/src/openexr-1-fix-aligned-alloc.patch
new file mode 100644
index 0000000..131d2a1
--- /dev/null
+++ b/src/openexr-1-fix-aligned-alloc.patch
@@ -0,0 +1,38 @@
+diff -uNr openexr-2.1.0.orig/IlmImf/ImfSystemSpecific.h openexr-2.1.0/IlmImf/ImfSystemSpecific.h
+--- openexr-2.1.0.orig/IlmImf/ImfSystemSpecific.h 2013-10-21 21:02:22.000000000 +0200
++++ openexr-2.1.0/IlmImf/ImfSystemSpecific.h 2015-01-07 15:31:25.851288890 +0100
+@@ -58,6 +58,20 @@
+ #define EXR_FORCEINLINE inline
+ #define EXR_RESTRICT __restrict
+
++#ifdef __MINGW32__
++
++static void* EXRAllocAligned(size_t size, size_t alignment)
++{
++ return _aligned_malloc(size, alignment);
++}
++
++static void EXRFreeAligned(void* ptr)
++{
++ return _aligned_free(ptr);
++}
++
++#else
++
+ static void* EXRAllocAligned(size_t size, size_t alignment)
+ {
+ void* ptr = 0;
+@@ -65,12 +79,12 @@
+ return ptr;
+ }
+
+-
+ static void EXRFreeAligned(void* ptr)
+ {
+ free(ptr);
+ }
+
++#endif
+ #elif defined _MSC_VER
+
+ #define EXR_FORCEINLINE __forceinline