Salome HOME
8bf79df6065dc302396bd4158657d158747913ef
[tools/configuration.git] / config / patches / freeimage.001_sources.patch
1 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
2 --- freeimage-3.16.0_orig/Source/LibWebP/src/utils/bit_writer.c
3 +++ freeimage-3.16.0_patch/Source/LibWebP/src/utils/bit_writer.c
4 @@ -226,6 +226,21 @@
5  #define htole16(x) (x)\r
6  #else     // pretty much all linux and/or glibc\r
7  #include <endian.h>\r
8 +#if !defined(htole32)
9 +# include <byteswap.h>
10 +# ifdef __USE_BSD
11 +/* Conversion interfaces.  */
12 +#if __BYTE_ORDER == __LITTLE_ENDIAN
13 +#define htole16(x) (x)
14 +#define htole32(x) (x)
15 +#define htole64(x) (x)
16 +#else
17 +#define htole16(x) __bswap_16 (x)
18 +#define htole32(x) __bswap_32 (x)
19 +#define htole64(x) __bswap_64 (x)
20 +#endif
21 +#endif
22 +#endif
23  #endif\r
24  \r
25  // Returns 1 on success.\r