Salome HOME
Using gcc 4.4 on CentOS 5.5
[tools/install.git] / config_files / patches / freeimage-3.16.0.patch
diff --git a/config_files/patches/freeimage-3.16.0.patch b/config_files/patches/freeimage-3.16.0.patch
new file mode 100644 (file)
index 0000000..84dffb5
--- /dev/null
@@ -0,0 +1,25 @@
+diff -Naur --exclude=CVS freeimage-3.16.0_orig/Source/LibWebP/src/utils/bit_writer.c freeimage-3.16.0_patch/Source/LibWebP/src/utils/bit_writer.c
+--- freeimage-3.16.0_orig/Source/LibWebP/src/utils/bit_writer.c        2014-03-08 19:31:50.000000000 +0400
++++ freeimage-3.16.0_patch/Source/LibWebP/src/utils/bit_writer.c       2014-06-10 12:16:20.000000000 +0400
+@@ -226,6 +226,21 @@
+ #define htole16(x) (x)\r
+ #else     // pretty much all linux and/or glibc\r
+ #include <endian.h>\r
++#if !defined(htole32)
++# include <byteswap.h>
++# ifdef __USE_BSD
++/* Conversion interfaces.  */
++#if __BYTE_ORDER == __LITTLE_ENDIAN
++#define htole16(x) (x)
++#define htole32(x) (x)
++#define htole64(x) (x)
++#else
++#define htole16(x) __bswap_16 (x)
++#define htole32(x) __bswap_32 (x)
++#define htole64(x) __bswap_64 (x)
++#endif
++#endif
++#endif
+ #endif\r
\r
+ // Returns 1 on success.\r