summaryrefslogtreecommitdiffstats
path: root/src/freeimage-1-fixes.patch
blob: b166db52651256d7e5a4774bdaf0f16d3de21123 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
This file is part of MXE.
See index.html for further information.

Contains ad hoc patches for cross building.

From 85f449a5341881f90a6af1dbbb7f3d3cd656bca6 Mon Sep 17 00:00:00 2001
From: MXE
Date: Sat, 27 Oct 2012 22:57:27 +0200
Subject: [PATCH 1/2] include string.h for memset

taken from https://sourceforge.net/tracker/?func=detail&aid=3581223&group_id=11504&atid=311504

diff --git a/Source/OpenEXR/IlmImf/ImfAutoArray.h b/Source/OpenEXR/IlmImf/ImfAutoArray.h
index edb8b10..0b1378e 100755
--- a/Source/OpenEXR/IlmImf/ImfAutoArray.h
+++ b/Source/OpenEXR/IlmImf/ImfAutoArray.h
@@ -45,6 +45,10 @@
 //-----------------------------------------------------------------------------
 
 #include "OpenEXRConfig.h"
+#ifdef __MINGW32__
+// needed for memset
+#include <string.h>
+#endif
 
 namespace Imf {
 
-- 
1.8.2.2


From 1c85f65b9efc06760ac572ba19c1c513f14d4719 Mon Sep 17 00:00:00 2001
From: MXE
Date: Sat, 11 May 2013 15:15:39 +1000
Subject: [PATCH 2/2] mingw-w64 fixes


diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp
index 72218a2..10c86fd 100755
--- a/Source/FreeImage/PluginTIFF.cpp
+++ b/Source/FreeImage/PluginTIFF.cpp
@@ -35,6 +35,8 @@
 #undef __unix
 #endif
 
+#include <stdint.h>
+
 #include "FreeImage.h"
 #include "Utilities.h"
 #include "../LibTIFF4/tiffiop.h"
@@ -207,7 +209,7 @@ TIFFFdOpen(thandle_t handle, const char *name, const char *mode) {
     // 64bit machines (sizeof(int) != sizeof(long)). 
     // Needs to be fixed within libTIFF.
 	if (tif) {
-		tif->tif_fd = (long)handle;
+		tif->tif_fd = (intptr_t)handle;
 	}
 
 	return tif;
-- 
1.8.2.2