summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-06-13 15:57:00 +0000
committerSam James <sam@gentoo.org>2021-06-13 17:13:50 +0000
commitbe1d010756554436c29f4a3746aee3870653db15 (patch)
tree93bbdd9c2882c7ba18280a1a19e163555c9c65e4 /media-plugins
parentgames-util/antimicro: fix build with GCC 11 (diff)
downloadgentoo-be1d010756554436c29f4a3746aee3870653db15.tar.gz
gentoo-be1d010756554436c29f4a3746aee3870653db15.tar.bz2
gentoo-be1d010756554436c29f4a3746aee3870653db15.zip
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@gentoo.org>
Diffstat (limited to 'media-plugins')
-rw-r--r--media-plugins/vdr-pin/files/vdr-pin-0.1.17-gcc11-strstr-ptr-comp.patch12
-rw-r--r--media-plugins/vdr-pin/vdr-pin-0.1.17-r1.ebuild4
2 files changed, 16 insertions, 0 deletions
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 000000000000..afa7cc2e32aa
--- /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 ac2a86c16029..abfbb7981dc1 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