summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-04-22 01:01:19 +0100
committerSam James <sam@gentoo.org>2022-04-22 01:20:10 +0100
commitd65dc3c1a57f44e5cc517f49bf95efc1eee99907 (patch)
tree1fe58a1c1ca2f7e1ef6156608e2ce84804beb096 /dev-libs/libcec
parentdev-util/diffoscope: add 210 (diff)
downloadgentoo-d65dc3c1a57f44e5cc517f49bf95efc1eee99907.tar.gz
gentoo-d65dc3c1a57f44e5cc517f49bf95efc1eee99907.tar.bz2
gentoo-d65dc3c1a57f44e5cc517f49bf95efc1eee99907.zip
dev-libs/libcec: fix build with musl 1.2.3
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/libcec')
-rw-r--r--dev-libs/libcec/files/libcec-6.0.2-musl-nullptr.patch29
-rw-r--r--dev-libs/libcec/libcec-6.0.2.ebuild3
2 files changed, 31 insertions, 1 deletions
diff --git a/dev-libs/libcec/files/libcec-6.0.2-musl-nullptr.patch b/dev-libs/libcec/files/libcec-6.0.2-musl-nullptr.patch
new file mode 100644
index 000000000000..d161e20c130d
--- /dev/null
+++ b/dev-libs/libcec/files/libcec-6.0.2-musl-nullptr.patch
@@ -0,0 +1,29 @@
+https://github.com/Pulse-Eight/libcec/pull/599
+
+From 452b2049b2ee3e73968c603e5524b2d349ac0c3e Mon Sep 17 00:00:00 2001
+From: psykose <alice@ayaya.dev>
+Date: Sat, 9 Apr 2022 17:59:11 +0000
+Subject: [PATCH] cecloader.h: fix null return
+
+returning NULL is invalid for a return type of bool when NULL is defined
+as `nullptr` instead of 0L
+--- a/include/cecloader.h
++++ b/include/cecloader.h
+@@ -172,7 +172,7 @@ bool LibCecBootloader(const char *strLib = NULL)
+ if (!g_libCEC)
+ {
+ std::cout << dlerror() << std::endl;
+- return NULL;
++ return false;
+ }
+ }
+
+@@ -181,7 +181,7 @@ bool LibCecBootloader(const char *strLib = NULL)
+ if (!LibCecBootloader)
+ {
+ std::cout << "cannot find CECStartBootloader" << std::endl;
+- return NULL;
++ return false;
+ }
+
+ bool bReturn = LibCecBootloader();
diff --git a/dev-libs/libcec/libcec-6.0.2.ebuild b/dev-libs/libcec/libcec-6.0.2.ebuild
index 80507a293bfb..9518fad0b156 100644
--- a/dev-libs/libcec/libcec-6.0.2.ebuild
+++ b/dev-libs/libcec/libcec-6.0.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -36,6 +36,7 @@ S="${WORKDIR}/${PN}-${MY_P}"
PATCHES=(
"${FILESDIR}/${PN}-4.0.7-no-override-udev.patch"
+ "${FILESDIR}/${PN}-6.0.2-musl-nullptr.patch"
)
pkg_pretend() {