summaryrefslogtreecommitdiffstats
path: root/recipes-extended
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2021-05-14 11:51:52 +0200
committerBruce Ashfield <bruce.ashfield@gmail.com>2021-05-14 08:28:42 -0400
commit670fbe932cb83581a1288eb16d288ba95f10222d (patch)
tree40e76e7c9afb2d96da282cbda2c34c3fb22d390a /recipes-extended
parent67807f2bc32c713805a223574abf645a44545f99 (diff)
downloadmeta-virtualization-670fbe932cb83581a1288eb16d288ba95f10222d.tar.gz
upx: fix build with gcc-11
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-extended')
-rw-r--r--recipes-extended/upx/upx/0001-MyCom.h-fix-build-with-gcc-11.patch31
-rw-r--r--recipes-extended/upx/upx_git.bb4
2 files changed, 34 insertions, 1 deletions
diff --git a/recipes-extended/upx/upx/0001-MyCom.h-fix-build-with-gcc-11.patch b/recipes-extended/upx/upx/0001-MyCom.h-fix-build-with-gcc-11.patch
new file mode 100644
index 00000000..8b07c77e
--- /dev/null
+++ b/recipes-extended/upx/upx/0001-MyCom.h-fix-build-with-gcc-11.patch
@@ -0,0 +1,31 @@
1From 8fe8cd22163fe11b791aac15b642d122ea98b9b5 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <martin.jansa@lge.com>
3Date: Fri, 14 May 2021 02:26:13 -0700
4Subject: [PATCH] MyCom.h: fix build with gcc-11
5
6* fixes:
7 ./../src/lzma-sdk/C/7zip/Compress/LZMA/LZMAEncoder.h: In member function 'virtual ULONG NCompress::NLZMA::CEncoder::Release()':
8 ./../src/lzma-sdk/C/7zip/Compress/LZMA/../../../Common/MyCom.h:159:32: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
9 159 | STDMETHOD_(ULONG, Release)() { if (--__m_RefCount != 0) \
10 | ^~
11
12Upstream-Status: Submitted [https://github.com/upx/upx-lzma-sdk/pull/5]
13Signed-off-by: Martin Jansa <martin.jansa@lge.com>
14---
15 C/Common/MyCom.h | 3 +--
16 1 file changed, 1 insertion(+), 2 deletions(-)
17
18diff --git a/C/Common/MyCom.h b/C/Common/MyCom.h
19index b8dbf38..2e3c54a 100644
20--- a/C/Common/MyCom.h
21+++ b/C/Common/MyCom.h
22@@ -156,8 +156,7 @@ public:
23
24 #define MY_ADDREF_RELEASE \
25 STDMETHOD_(ULONG, AddRef)() { return ++__m_RefCount; } \
26-STDMETHOD_(ULONG, Release)() { if (--__m_RefCount != 0) \
27- return __m_RefCount; delete this; return 0; }
28+STDMETHOD_(ULONG, Release)() { if (--__m_RefCount != 0) return __m_RefCount; delete this; return 0; }
29
30 #define MY_UNKNOWN_IMP_SPEC(i) \
31 MY_QUERYINTERFACE_BEGIN \
diff --git a/recipes-extended/upx/upx_git.bb b/recipes-extended/upx/upx_git.bb
index b77e6589..96d2e996 100644
--- a/recipes-extended/upx/upx_git.bb
+++ b/recipes-extended/upx/upx_git.bb
@@ -2,7 +2,9 @@ HOMEPAGE = "http://upx.sourceforge.net"
2SUMMARY = "Ultimate executable compressor." 2SUMMARY = "Ultimate executable compressor."
3 3
4SRCREV = "4e1ae22a1a07be5135c68b25ff05058ae8ae48e1" 4SRCREV = "4e1ae22a1a07be5135c68b25ff05058ae8ae48e1"
5SRC_URI = "gitsm://github.com/upx/upx;branch=devel" 5SRC_URI = "gitsm://github.com/upx/upx;branch=devel \
6 file://0001-MyCom.h-fix-build-with-gcc-11.patch;patchdir=src/lzma-sdk \
7"
6 8
7LICENSE = "GPLv2" 9LICENSE = "GPLv2"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=353753597aa110e0ded3508408c6374a" 10LIC_FILES_CHKSUM = "file://LICENSE;md5=353753597aa110e0ded3508408c6374a"