commit:     be1d010756554436c29f4a3746aee3870653db15
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 13 15:57:00 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun 13 17:13:50 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be1d0107

media-plugins/vdr-pin: fix build with GCC 11

strstr will be non-zero if a match is found.

Closes: https://bugs.gentoo.org/791733
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../vdr-pin/files/vdr-pin-0.1.17-gcc11-strstr-ptr-comp.patch | 12 ++++++++++++
 media-plugins/vdr-pin/vdr-pin-0.1.17-r1.ebuild               |  4 ++++
 2 files changed, 16 insertions(+)

diff --git 
a/media-plugins/vdr-pin/files/vdr-pin-0.1.17-gcc11-strstr-ptr-comp.patch 
b/media-plugins/vdr-pin/files/vdr-pin-0.1.17-gcc11-strstr-ptr-comp.patch
new file mode 100644
index 00000000000..afa7cc2e32a
--- /dev/null
+++ b/media-plugins/vdr-pin/files/vdr-pin-0.1.17-gcc11-strstr-ptr-comp.patch
@@ -0,0 +1,12 @@
+https://bugs.gentoo.org/791733
+--- a/locks.c
++++ b/locks.c
+@@ -233,7 +233,7 @@ bool cLockItem::MatchPattern(const char* aName)
+    else if (searchMode == smExact)
+       return strcmp(pattern, aName) == 0;
+    else if (searchMode == smInclude)
+-      return strstr(aName, pattern) > 0;
++      return strstr(aName, pattern) != 0;
+    else if (searchMode == smStartWith)
+       return strstr(aName, pattern) == aName;
+ 

diff --git a/media-plugins/vdr-pin/vdr-pin-0.1.17-r1.ebuild 
b/media-plugins/vdr-pin/vdr-pin-0.1.17-r1.ebuild
index ac2a86c1602..abfbb7981dc 100644
--- a/media-plugins/vdr-pin/vdr-pin-0.1.17-r1.ebuild
+++ b/media-plugins/vdr-pin/vdr-pin-0.1.17-r1.ebuild
@@ -21,6 +21,10 @@ RDEPEND="${DEPEND}"
 
 S="${WORKDIR}/vdr-plugin-pin-${VERSION_GIT}"
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.1.17-gcc11-strstr-ptr-comp.patch
+)
+
 src_prepare() {
        vdr-plugin-2_src_prepare
 

Reply via email to