[oe,meta-multimedia,05/18] cdparanoia: Fix build with musl

Message ID 20170714054013.34458-5-raj.khem@gmail.com
State New
Headers show
Series
  • [oe,meta-initramfs,01/18] klibc: Fix build issue when default ISA is not thumb
Related show

Commit Message

Khem Raj July 14, 2017, 5:40 a.m.
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 .../cdparanoia/cdparanoia_10.2.bb                  |  1 +
 ...-utils-Use-c99-compiler-independent-types.patch | 49 ++++++++++++++++++++++
 2 files changed, 50 insertions(+)
 create mode 100644 meta-multimedia/recipes-multimedia/cdparanoia/files/0001-utils-Use-c99-compiler-independent-types.patch

-- 
2.13.2

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Patch

diff --git a/meta-multimedia/recipes-multimedia/cdparanoia/cdparanoia_10.2.bb b/meta-multimedia/recipes-multimedia/cdparanoia/cdparanoia_10.2.bb
index 30d71ff2c..27fa0e585 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
            file://out-of-tree-build.patch \
            file://0001-check-for-null-buffer-before-trying-a-byteswap.patch \
            file://0002-Fix-printf-format-errors.patch \
+           file://0001-utils-Use-c99-compiler-independent-types.patch \
            "
 SRC_URI[md5sum] = "b304bbe8ab63373924a744eac9ebc652"
 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 000000000..7699017f7
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/cdparanoia/files/0001-utils-Use-c99-compiler-independent-types.patch
@@ -0,0 +1,49 @@ 
+From 89071cbc8d3ab9a15503f397580b7590338e5e91 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 12 Jul 2017 17:23:45 -0700
+Subject: [PATCH] utils: Use c99 compiler independent types
+
+Make it portable across different platforms
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ utils.h | 13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/utils.h b/utils.h
+index 10dce58..73bba92 100644
+--- a/utils.h
++++ b/utils.h
+@@ -3,6 +3,7 @@
+ #include <stdio.h>
+ #include <errno.h>
+ #include <string.h>
++#include <stdint.h>
+ 
+ extern long buffering_write(int outf, char *buffer, long num);
+ extern int buffering_close(int fd);
+@@ -18,15 +19,15 @@ static inline int bigendianp(void){
+ }
+ 
+ static inline int32_t swap32(int32_t x){
+-  return((((u_int32_t)x & 0x000000ffU) << 24) | 
+-	 (((u_int32_t)x & 0x0000ff00U) <<  8) | 
+-	 (((u_int32_t)x & 0x00ff0000U) >>  8) | 
+-	 (((u_int32_t)x & 0xff000000U) >> 24));
++  return((((uint32_t)x & 0x000000ffU) << 24) | 
++	 (((uint32_t)x & 0x0000ff00U) <<  8) | 
++	 (((uint32_t)x & 0x00ff0000U) >>  8) | 
++	 (((uint32_t)x & 0xff000000U) >> 24));
+ }
+ 
+ static inline int16_t swap16(int16_t x){
+-  return((((u_int16_t)x & 0x00ffU) <<  8) | 
+-	 (((u_int16_t)x & 0xff00U) >>  8));
++  return((((uint16_t)x & 0x00ffU) <<  8) | 
++	 (((uint16_t)x & 0xff00U) >>  8));
+ }
+ 
+ #if BYTE_ORDER == LITTLE_ENDIAN
+-- 
+2.13.2
+