forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net-firewall/rtsp-conntrack: Fix implicit declaration of strlcpy
Ditching strlcpy in favor of strscpy Closes: https://bugs.gentoo.org/928590 Signed-off-by: Brahmajit Das <[email protected]> Closes: gentoo#36462 Signed-off-by: Joonas Niilola <[email protected]>
- Loading branch information
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
net-firewall/rtsp-conntrack/files/rtsp-conntrack-5.3-strlcpy.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
https://patch-diff.githubusercontent.com/raw/maru-sama/rtsp-linux/pull/12.patch | ||
From: Brahmajit Das <[email protected]> | ||
Date: Sun, 28 Apr 2024 01:48:03 +0530 | ||
Subject: [PATCH 1/1] Fix build with Linux 6.8 | ||
|
||
With commit | ||
https://github.com/torvalds/linux/commit/57f22c8dab6b266ae36b89b073a4a33dea71e762 | ||
strlcpy has been removed in favor of strscpy. Thus giving us build error | ||
such as nf_conntrack_rtsp.c: error: implicit declaration of function | ||
strlcpy. | ||
|
||
First reported on Gentoo Linux, please reffer: | ||
https://bugs.gentoo.org/928590 | ||
|
||
Signed-off-by: Brahmajit Das <[email protected]> | ||
--- a/nf_conntrack_rtsp.c | ||
+++ b/nf_conntrack_rtsp.c | ||
@@ -550,7 +550,7 @@ init(void) | ||
} | ||
|
||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) | ||
- strlcpy(hlpr->name, tmpname, sizeof(hlpr->name)); | ||
+ strscpy(hlpr->name, tmpname, sizeof(hlpr->name)); | ||
#else | ||
hlpr->name = tmpname; | ||
#endif | ||
-- | ||
2.44.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright 1999-2024 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
inherit linux-mod-r1 | ||
|
||
DESCRIPTION="RTSP conntrack module for Netfilter" | ||
HOMEPAGE="https://mike.it-loops.com/rtsp" | ||
SRC_URI="https://github.com/maru-sama/rtsp-linux/archive/${PV}.tar.gz -> ${P}.tar.gz" | ||
S="${WORKDIR}/rtsp-linux-${PV}" | ||
|
||
LICENSE="GPL-2" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~x86" | ||
|
||
CONFIG_CHECK="NF_CONNTRACK" | ||
|
||
PATCHES=( | ||
"${FILESDIR}"/${P}-strlcpy.patch | ||
) | ||
|
||
src_compile() { | ||
local modlist=( | ||
nf_conntrack_rtsp=net/netfilter | ||
nf_nat_rtsp=net/ipv4/netfilter | ||
) | ||
local modargs=( KERNELDIR="${KV_OUT_DIR}" ) | ||
|
||
linux-mod-r1_src_compile | ||
} |