summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQian Lei <qianl.fnst@cn.fujitsu.com>2014-11-20 16:43:57 +0800
committerJoe MacDonald <joe_macdonald@mentor.com>2015-01-12 11:51:55 -0500
commit219b51985fb534151b6af0f5639aaee6101ffc24 (patch)
tree00269c7aec0d0b734a31d561a15e05dc7072cd42
parent72724654068c659ad44fa6e783c83334041aeefc (diff)
downloadmeta-selinux-219b51985fb534151b6af0f5639aaee6101ffc24.tar.gz
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 <qianl.fnst@cn.fujitsu.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
-rw-r--r--recipes-extended/ustr/ustr/ustr-c99-inline.patch30
-rw-r--r--recipes-extended/ustr/ustr_1.0.4.bb3
2 files changed, 32 insertions, 1 deletions
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 @@
1diff -rup ustr-1.0.4-orig/ustr-compiler.h ustr-1.0.4/ustr-compiler.h
2--- ustr-1.0.4-orig/ustr-compiler.h 2008-02-15 15:12:28.000000000 -0500
3+++ ustr-1.0.4/ustr-compiler.h 2008-06-13 15:25:18.000000000 -0400
4@@ -113,17 +113,23 @@
5 #endif
6
7 #ifndef USTR_CONF_EI_PROTO /* external inline */
8-# if USTR_CONF_INCLUDE_CODEONLY_HEADERS
9+# if USTR_CONF_INCLUDE_CODEONLY_HEADERS || ! defined(__GNUC__) || \
10+ ! USTR_CONF_COMPILE_USE_INLINE
11 # define USTR_CONF_EI_PROTO static USTR__INLINE
12 # else
13 # define USTR_CONF_EI_PROTO extern
14 # endif
15 #endif
16 #ifndef USTR_CONF_II_PROTO /* implementation of inline */
17-# if USTR_CONF_INCLUDE_CODEONLY_HEADERS
18+# if USTR_CONF_INCLUDE_CODEONLY_HEADERS || ! defined(__GNUC__) || \
19+ ! USTR_CONF_COMPILE_USE_INLINE
20 # define USTR_CONF_II_PROTO static USTR__INLINE
21 # else
22-# define USTR_CONF_II_PROTO extern inline
23+# if defined(__GNUC_STDC_INLINE__) || defined(__GNUC_GNU_INLINE__)
24+# define USTR_CONF_II_PROTO extern inline __attribute__ ((__gnu_inline__))
25+# else
26+# define USTR_CONF_II_PROTO extern inline
27+# endif
28 # endif
29 #endif
30
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 \
14SRC_URI = "\ 14SRC_URI = "\
15 http://www.and.org/ustr/${BPV}/${BPN}-${PV}.tar.bz2 \ 15 http://www.and.org/ustr/${BPV}/${BPN}-${PV}.tar.bz2 \
16 file://ustr-makefile-fix.patch;patch=1 \ 16 file://ustr-makefile-fix.patch;patch=1 \
17 file://ustr-fix__va_copy-not-defined.patch;patch=2" 17 file://ustr-fix__va_copy-not-defined.patch;patch=2 \
18 file://ustr-c99-inline.patch;patch=3"
18SRC_URI[md5sum] = "93147d9f0c9765d4cd0f04f7e44bdfce" 19SRC_URI[md5sum] = "93147d9f0c9765d4cd0f04f7e44bdfce"
19SRC_URI[sha256sum] = "3daf6eae9f78de1e872c0b2b83cce35515b94d4bb8a074e48f331fd99e1fc2c4" 20SRC_URI[sha256sum] = "3daf6eae9f78de1e872c0b2b83cce35515b94d4bb8a074e48f331fd99e1fc2c4"
20 21