diff options
| -rw-r--r-- | meta-multimedia/recipes-multimedia/cdparanoia/cdparanoia_10.2.bb | 1 | ||||
| -rw-r--r-- | meta-multimedia/recipes-multimedia/cdparanoia/files/0001-utils-Use-c99-compiler-independent-types.patch | 49 |
2 files changed, 50 insertions, 0 deletions
diff --git a/meta-multimedia/recipes-multimedia/cdparanoia/cdparanoia_10.2.bb b/meta-multimedia/recipes-multimedia/cdparanoia/cdparanoia_10.2.bb index 30d71ff2c0..27fa0e5855 100644 --- a/meta-multimedia/recipes-multimedia/cdparanoia/cdparanoia_10.2.bb +++ b/meta-multimedia/recipes-multimedia/cdparanoia/cdparanoia_10.2.bb | |||
| @@ -15,6 +15,7 @@ SRC_URI = "http://downloads.xiph.org/releases/cdparanoia/cdparanoia-III-${PV}.sr | |||
| 15 | file://out-of-tree-build.patch \ | 15 | file://out-of-tree-build.patch \ |
| 16 | file://0001-check-for-null-buffer-before-trying-a-byteswap.patch \ | 16 | file://0001-check-for-null-buffer-before-trying-a-byteswap.patch \ |
| 17 | file://0002-Fix-printf-format-errors.patch \ | 17 | file://0002-Fix-printf-format-errors.patch \ |
| 18 | file://0001-utils-Use-c99-compiler-independent-types.patch \ | ||
| 18 | " | 19 | " |
| 19 | SRC_URI[md5sum] = "b304bbe8ab63373924a744eac9ebc652" | 20 | SRC_URI[md5sum] = "b304bbe8ab63373924a744eac9ebc652" |
| 20 | SRC_URI[sha256sum] = "005db45ef4ee017f5c32ec124f913a0546e77014266c6a1c50df902a55fe64df" | 21 | SRC_URI[sha256sum] = "005db45ef4ee017f5c32ec124f913a0546e77014266c6a1c50df902a55fe64df" |
diff --git a/meta-multimedia/recipes-multimedia/cdparanoia/files/0001-utils-Use-c99-compiler-independent-types.patch b/meta-multimedia/recipes-multimedia/cdparanoia/files/0001-utils-Use-c99-compiler-independent-types.patch new file mode 100644 index 0000000000..7699017f77 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/cdparanoia/files/0001-utils-Use-c99-compiler-independent-types.patch | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | From 89071cbc8d3ab9a15503f397580b7590338e5e91 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Wed, 12 Jul 2017 17:23:45 -0700 | ||
| 4 | Subject: [PATCH] utils: Use c99 compiler independent types | ||
| 5 | |||
| 6 | Make it portable across different platforms | ||
| 7 | |||
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 9 | --- | ||
| 10 | utils.h | 13 +++++++------ | ||
| 11 | 1 file changed, 7 insertions(+), 6 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/utils.h b/utils.h | ||
| 14 | index 10dce58..73bba92 100644 | ||
| 15 | --- a/utils.h | ||
| 16 | +++ b/utils.h | ||
| 17 | @@ -3,6 +3,7 @@ | ||
| 18 | #include <stdio.h> | ||
| 19 | #include <errno.h> | ||
| 20 | #include <string.h> | ||
| 21 | +#include <stdint.h> | ||
| 22 | |||
| 23 | extern long buffering_write(int outf, char *buffer, long num); | ||
| 24 | extern int buffering_close(int fd); | ||
| 25 | @@ -18,15 +19,15 @@ static inline int bigendianp(void){ | ||
| 26 | } | ||
| 27 | |||
| 28 | static inline int32_t swap32(int32_t x){ | ||
| 29 | - return((((u_int32_t)x & 0x000000ffU) << 24) | | ||
| 30 | - (((u_int32_t)x & 0x0000ff00U) << 8) | | ||
| 31 | - (((u_int32_t)x & 0x00ff0000U) >> 8) | | ||
| 32 | - (((u_int32_t)x & 0xff000000U) >> 24)); | ||
| 33 | + return((((uint32_t)x & 0x000000ffU) << 24) | | ||
| 34 | + (((uint32_t)x & 0x0000ff00U) << 8) | | ||
| 35 | + (((uint32_t)x & 0x00ff0000U) >> 8) | | ||
| 36 | + (((uint32_t)x & 0xff000000U) >> 24)); | ||
| 37 | } | ||
| 38 | |||
| 39 | static inline int16_t swap16(int16_t x){ | ||
| 40 | - return((((u_int16_t)x & 0x00ffU) << 8) | | ||
| 41 | - (((u_int16_t)x & 0xff00U) >> 8)); | ||
| 42 | + return((((uint16_t)x & 0x00ffU) << 8) | | ||
| 43 | + (((uint16_t)x & 0xff00U) >> 8)); | ||
| 44 | } | ||
| 45 | |||
| 46 | #if BYTE_ORDER == LITTLE_ENDIAN | ||
| 47 | -- | ||
| 48 | 2.13.2 | ||
| 49 | |||
