From 219b51985fb534151b6af0f5639aaee6101ffc24 Mon Sep 17 00:00:00 2001 From: Qian Lei Date: Thu, 20 Nov 2014 16:43:57 +0800 Subject: ustr: Add a new patch This patch has been applied in fedora to fix c99 inline problems. Upstream hasn't been updated since 2008 and those c99 problems still exist in the last version 1.0.4. Signed-off-by: Qian Lei Signed-off-by: Joe MacDonald --- recipes-extended/ustr/ustr/ustr-c99-inline.patch | 30 ++++++++++++++++++++++++ recipes-extended/ustr/ustr_1.0.4.bb | 3 ++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 recipes-extended/ustr/ustr/ustr-c99-inline.patch diff --git a/recipes-extended/ustr/ustr/ustr-c99-inline.patch b/recipes-extended/ustr/ustr/ustr-c99-inline.patch new file mode 100644 index 0000000..dfa021f --- /dev/null +++ b/recipes-extended/ustr/ustr/ustr-c99-inline.patch @@ -0,0 +1,30 @@ +diff -rup ustr-1.0.4-orig/ustr-compiler.h ustr-1.0.4/ustr-compiler.h +--- ustr-1.0.4-orig/ustr-compiler.h 2008-02-15 15:12:28.000000000 -0500 ++++ ustr-1.0.4/ustr-compiler.h 2008-06-13 15:25:18.000000000 -0400 +@@ -113,17 +113,23 @@ + #endif + + #ifndef USTR_CONF_EI_PROTO /* external inline */ +-# if USTR_CONF_INCLUDE_CODEONLY_HEADERS ++# if USTR_CONF_INCLUDE_CODEONLY_HEADERS || ! defined(__GNUC__) || \ ++ ! USTR_CONF_COMPILE_USE_INLINE + # define USTR_CONF_EI_PROTO static USTR__INLINE + # else + # define USTR_CONF_EI_PROTO extern + # endif + #endif + #ifndef USTR_CONF_II_PROTO /* implementation of inline */ +-# if USTR_CONF_INCLUDE_CODEONLY_HEADERS ++# if USTR_CONF_INCLUDE_CODEONLY_HEADERS || ! defined(__GNUC__) || \ ++ ! USTR_CONF_COMPILE_USE_INLINE + # define USTR_CONF_II_PROTO static USTR__INLINE + # else +-# define USTR_CONF_II_PROTO extern inline ++# if defined(__GNUC_STDC_INLINE__) || defined(__GNUC_GNU_INLINE__) ++# define USTR_CONF_II_PROTO extern inline __attribute__ ((__gnu_inline__)) ++# else ++# define USTR_CONF_II_PROTO extern inline ++# endif + # endif + #endif + diff --git a/recipes-extended/ustr/ustr_1.0.4.bb b/recipes-extended/ustr/ustr_1.0.4.bb index 34bb4ce..a0a1e41 100644 --- a/recipes-extended/ustr/ustr_1.0.4.bb +++ b/recipes-extended/ustr/ustr_1.0.4.bb @@ -14,7 +14,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=c79c6e2ae13418d16d7dc82df960a1e7 \ SRC_URI = "\ http://www.and.org/ustr/${BPV}/${BPN}-${PV}.tar.bz2 \ file://ustr-makefile-fix.patch;patch=1 \ - file://ustr-fix__va_copy-not-defined.patch;patch=2" + file://ustr-fix__va_copy-not-defined.patch;patch=2 \ + file://ustr-c99-inline.patch;patch=3" SRC_URI[md5sum] = "93147d9f0c9765d4cd0f04f7e44bdfce" SRC_URI[sha256sum] = "3daf6eae9f78de1e872c0b2b83cce35515b94d4bb8a074e48f331fd99e1fc2c4" -- cgit v1.2.3-54-g00ecf