diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2006-06-17 18:29:25 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2006-06-17 18:29:25 +0000 |
commit | 7b941ed21dfcc63c825847856c5f54b97256e44a (patch) | |
tree | 0e1ccd7d428ba282de7316001cf7811011748146 /media-libs/libdts/files | |
parent | Use emake instead of make for install (diff) | |
download | gentoo-2-7b941ed21dfcc63c825847856c5f54b97256e44a.tar.gz gentoo-2-7b941ed21dfcc63c825847856c5f54b97256e44a.tar.bz2 gentoo-2-7b941ed21dfcc63c825847856c5f54b97256e44a.zip |
Add patch to fix strict aliasing breakages.
(Portage version: 2.1.1_pre1)
Diffstat (limited to 'media-libs/libdts/files')
-rw-r--r-- | media-libs/libdts/files/digest-libdts-0.0.2-r4 | 3 | ||||
-rw-r--r-- | media-libs/libdts/files/libdts-0.0.2-strict-aliasing.patch | 61 |
2 files changed, 64 insertions, 0 deletions
diff --git a/media-libs/libdts/files/digest-libdts-0.0.2-r4 b/media-libs/libdts/files/digest-libdts-0.0.2-r4 new file mode 100644 index 000000000000..4870747344da --- /dev/null +++ b/media-libs/libdts/files/digest-libdts-0.0.2-r4 @@ -0,0 +1,3 @@ +MD5 a1c0dac95d7031498c2d19d7a3107469 libdts-0.0.2.tar.gz 295185 +RMD160 c7b904465244b887e6b62f997bcf043d241cf2ce libdts-0.0.2.tar.gz 295185 +SHA256 ef552cedb9addd5c54a1d5adf49c2b5d6932606e7161443bd88a524a9a477595 libdts-0.0.2.tar.gz 295185 diff --git a/media-libs/libdts/files/libdts-0.0.2-strict-aliasing.patch b/media-libs/libdts/files/libdts-0.0.2-strict-aliasing.patch new file mode 100644 index 000000000000..6db9bd90e9a6 --- /dev/null +++ b/media-libs/libdts/files/libdts-0.0.2-strict-aliasing.patch @@ -0,0 +1,61 @@ +Index: libdts-0.0.2/libdts/bitstream.h +=================================================================== +--- libdts-0.0.2.orig/libdts/bitstream.h ++++ libdts-0.0.2/libdts/bitstream.h +@@ -28,22 +28,38 @@ + + #else + +-# define swab32(x)\ +-((((uint8_t*)&x)[0] << 24) | (((uint8_t*)&x)[1] << 16) | \ +- (((uint8_t*)&x)[2] << 8) | (((uint8_t*)&x)[3])) ++static inline uint32_t swab32(uint32_t x) { ++ union { ++ uint32_t x32; ++ uint16_t x8[4]; ++ } u; ++ u.x32 = x; ++ return u.x8[0] << 24 | u.x8[1] << 16 | u.x8[2] << 8 | u.x8[3]; ++} + + #endif + + #ifdef WORDS_BIGENDIAN + +-# define swable32(x)\ +-((((uint8_t*)&x)[0] << 16) | (((uint8_t*)&x)[1] << 24) | \ +- (((uint8_t*)&x)[2]) | (((uint8_t*)&x)[3] << 8)) ++static inline uint32_t swable32(uint32_t x) { ++ union { ++ uint32_t x32; ++ uint16_t x8[4]; ++ } u; ++ u.x32 = x; ++ return u.x8[0] << 16 | u.x8[1] << 24 | u.x8[2] | u.x8[3] << 8; ++} + + #else + +-# define swable32(x)\ +-((((uint16_t*)&x)[0] << 16) | (((uint16_t*)&x)[1])) ++static inline uint32_t swable32(uint32_t x) { ++ union { ++ uint32_t x32; ++ uint16_t x16[2]; ++ } u; ++ u.x32 = x; ++ return u.x16[0] << 16 | u.x16[1]; ++} + + #endif + +Index: libdts-0.0.2/libao/Makefile.am +=================================================================== +--- libdts-0.0.2.orig/libao/Makefile.am ++++ libdts-0.0.2/libao/Makefile.am +@@ -1,4 +1,4 @@ +-AM_CFLAGS = $(OPT_CFLAGS) ++AM_CFLAGS = $(OPT_CFLAGS) -fno-strict-aliasing + + noinst_LIBRARIES = libao.a + libao_a_SOURCES = audio_out.c audio_out_null.c audio_out_float.c \ |