diff options
author | 2023-07-25 08:59:04 -0400 | |
---|---|---|
committer | 2023-07-25 08:59:04 -0400 | |
commit | a2b0be7c44f72397f533322144bdb9751bb4c058 (patch) | |
tree | 0e9f1d2df90026d447a70e101cbd3bc91f1176a8 /app-laptop | |
parent | media-video/subtitlecomposer: Fix build and runtime with >=ffmpeg-6 (diff) | |
download | gentoo-a2b0be7c44f72397f533322144bdb9751bb4c058.tar.gz gentoo-a2b0be7c44f72397f533322144bdb9751bb4c058.tar.bz2 gentoo-a2b0be7c44f72397f533322144bdb9751bb4c058.zip |
app-laptop/tp_smapi: add upstream patch for linux-6.4 compatibility.
Closes: https://bugs.gentoo.org/911177
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'app-laptop')
-rw-r--r-- | app-laptop/tp_smapi/files/tp_smapi-0.43-linux-6.4.patch | 45 | ||||
-rw-r--r-- | app-laptop/tp_smapi/tp_smapi-0.43-r3.ebuild | 2 |
2 files changed, 47 insertions, 0 deletions
diff --git a/app-laptop/tp_smapi/files/tp_smapi-0.43-linux-6.4.patch b/app-laptop/tp_smapi/files/tp_smapi-0.43-linux-6.4.patch new file mode 100644 index 000000000000..4ff1facca07f --- /dev/null +++ b/app-laptop/tp_smapi/files/tp_smapi-0.43-linux-6.4.patch @@ -0,0 +1,45 @@ +From 0c3398b1acf2a2cabd9cee91dc3fe3d35805fa8b Mon Sep 17 00:00:00 2001 +From: Evgeni Golov <evgeni@golov.de> +Date: Fri, 16 Jun 2023 18:13:54 +0200 +Subject: [PATCH] update DEFINE_SEMAPHORE usage for linux 6.4+ + +Linux changed the DEFINE_SEMAPHORE macro in +48380368dec14859723b9e3fbd43e042638d9a76, making it take two parameters +instead of one. Pass an explicit 1 as on 6.4+. +--- + thinkpad_ec.c | 4 +++- + tp_smapi.c | 4 +++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/thinkpad_ec.c b/thinkpad_ec.c +index a8e812f..62ef5ca 100644 +--- a/thinkpad_ec.c ++++ b/thinkpad_ec.c +@@ -90,8 +90,10 @@ static u64 prefetch_jiffies; /* time of prefetch, or: */ + /* Locking: */ + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37) + static DECLARE_MUTEX(thinkpad_ec_mutex); +-#else ++#elif LINUX_VERSION_CODE < KERNEL_VERSION(6,4,0) + static DEFINE_SEMAPHORE(thinkpad_ec_mutex); ++#else ++static DEFINE_SEMAPHORE(thinkpad_ec_mutex, 1); + #endif + + /* Kludge in case the ACPI DSDT reserves the ports we need. */ +diff --git a/tp_smapi.c b/tp_smapi.c +index 6346287..9feebab 100644 +--- a/tp_smapi.c ++++ b/tp_smapi.c +@@ -111,8 +111,10 @@ static unsigned short smapi_port; /* APM control port, normally 0xB2 */ + + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37) + static DECLARE_MUTEX(smapi_mutex); +-#else ++#elif LINUX_VERSION_CODE < KERNEL_VERSION(6,4,0) + static DEFINE_SEMAPHORE(smapi_mutex); ++#else ++static DEFINE_SEMAPHORE(smapi_mutex, 1); + #endif + + /** diff --git a/app-laptop/tp_smapi/tp_smapi-0.43-r3.ebuild b/app-laptop/tp_smapi/tp_smapi-0.43-r3.ebuild index bf08d020ede7..b9105968ab60 100644 --- a/app-laptop/tp_smapi/tp_smapi-0.43-r3.ebuild +++ b/app-laptop/tp_smapi/tp_smapi-0.43-r3.ebuild @@ -15,6 +15,8 @@ KEYWORDS="~amd64 ~x86" IUSE="hdaps" +PATCHES=( "${FILESDIR}/${P}-linux-6.4.patch" ) + pkg_setup() { if use hdaps; then local CONFIG_CHECK="~INPUT_UINPUT" |