summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-10-17 01:08:32 +0100
committerSam James <sam@gentoo.org>2021-10-17 01:09:06 +0100
commitd5b5288d2eda333a283575c184c61f062cea7918 (patch)
treeef823e8d894384c8cc43f965de123894661b89ad /net-libs/libnids
parentdev-python/cachelib: skip fragile Redis tests (diff)
downloadgentoo-d5b5288d2eda333a283575c184c61f062cea7918.tar.gz
gentoo-d5b5288d2eda333a283575c184c61f062cea7918.tar.bz2
gentoo-d5b5288d2eda333a283575c184c61f062cea7918.zip
net-libs/libnids: don't inline exported functions
Closes: https://bugs.gentoo.org/818517 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-libs/libnids')
-rw-r--r--net-libs/libnids/files/libnids-1.24-no-inline.patch43
-rw-r--r--net-libs/libnids/libnids-1.24-r8.ebuild (renamed from net-libs/libnids/libnids-1.24-r7.ebuild)18
2 files changed, 52 insertions, 9 deletions
diff --git a/net-libs/libnids/files/libnids-1.24-no-inline.patch b/net-libs/libnids/files/libnids-1.24-no-inline.patch
new file mode 100644
index 000000000000..8a57c6354d3c
--- /dev/null
+++ b/net-libs/libnids/files/libnids-1.24-no-inline.patch
@@ -0,0 +1,43 @@
+https://src.fedoraproject.org/rpms/libnids/raw/rawhide/f/libnids-1.24-inline.patch
+https://bugs.gentoo.org/818517
+
+Patch by Robert Scheck <robert@fedoraproject.org> for libnids <= 1.24 which
+avoids making the functions ip_fast_csum, ip_compute_csum, my_tcp_check and
+my_udp_check inline, see https://github.com/aol/moloch/issues/440 as well.
+
+--- a/src/checksum.c
++++ b/src/checksum.c
+@@ -120,7 +120,7 @@
+ By Jorge Cwik <jorge@laser.satlink.net>, adapted for linux by Arnt
+ Gulbrandsen.
+ */
+-inline u_short ip_fast_csum(u_char * iph, u_int ihl)
++u_short ip_fast_csum(u_char * iph, u_int ihl)
+ {
+ u_int sum;
+ if (dontchksum(((struct ip*)iph)->ip_src.s_addr))
+@@ -191,13 +191,13 @@
+ this routine is used for miscellaneous IP-like checksums, mainly in
+ icmp.c
+ */
+-inline u_short
++u_short
+ ip_compute_csum(u_char * buff, int len)
+ {
+ return (csum_fold(csum_partial(buff, len, 0)));
+ }
+
+-inline u_short
++u_short
+ my_tcp_check(struct tcphdr *th, int len, u_int saddr, u_int daddr)
+ {
+ if (dontchksum(saddr))
+@@ -205,7 +205,7 @@
+ return csum_tcpudp_magic(saddr, daddr, len, IPPROTO_TCP,
+ csum_partial((u_char *)th, len, 0));
+ }
+-inline u_short
++u_short
+ my_udp_check(void *u, int len, u_int saddr, u_int daddr)
+ {
+ if (dontchksum(saddr))
diff --git a/net-libs/libnids/libnids-1.24-r7.ebuild b/net-libs/libnids/libnids-1.24-r8.ebuild
index aec872f32866..a993c8d91295 100644
--- a/net-libs/libnids/libnids-1.24-r7.ebuild
+++ b/net-libs/libnids/libnids-1.24-r8.ebuild
@@ -1,7 +1,8 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
+
inherit autotools flag-o-matic toolchain-funcs
DESCRIPTION="an implementation of an E-component of Network Intrusion Detection System"
@@ -13,20 +14,18 @@ SLOT="1.2"
KEYWORDS="amd64 ppc x86"
IUSE="+glib +libnet static-libs"
-RDEPEND="
- !net-libs/libnids:1.1
+RDEPEND="!net-libs/libnids:1.1
net-libs/libpcap
glib? ( dev-libs/glib:2 )
- libnet? ( >=net-libs/libnet-1.1.0-r3 )
-"
-DEPEND="
- ${RDEPEND}
- glib? ( virtual/pkgconfig )
-"
+ libnet? ( >=net-libs/libnet-1.1.0-r3 )"
+DEPEND="${RDEPEND}"
+BDEPEND="glib? ( virtual/pkgconfig )"
+
PATCHES=(
"${FILESDIR}"/${P}-ldflags.patch
"${FILESDIR}"/${P}-libdir.patch
"${FILESDIR}"/${P}-static-libs.patch
+ "${FILESDIR}"/${P}-no-inline.patch
)
src_prepare() {
@@ -36,6 +35,7 @@ src_prepare() {
src_configure() {
tc-export AR
+
append-flags -fno-strict-aliasing
econf \