!70 fix a not defined macro error

From: @xinghe_1 
Reviewed-by: @zengwefeng 
Signed-off-by: @zengwefeng
This commit is contained in:
openeuler-ci-bot 2024-05-09 03:40:58 +00:00 committed by Gitee
commit f209820b9d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 39 additions and 1 deletions

View File

@ -0,0 +1,31 @@
From bfc96b04831641376636337406aae7fe0fe65081 Mon Sep 17 00:00:00 2001
From: Francois-Xavier Le Bail <devel.fx.lebail@orange.fr>
Date: Wed, 6 Mar 2024 21:11:42 +0100
Subject: [PATCH] Capsicum support: Fix a 'not defined' macro error
The error was:
In file included from ./tcpdump.c:158:
./interface.h:62:32: error: "HAVE_CAPSICUM" is not defined, evaluates
to 0 [-Werror=undef]
62 | (defined(HAVE_BPF_DUMP) && HAVE_CAPSICUM && !defined(bpf_dump))
| ^~~~~~~~~~~~~
Conflict: NA
Reference: https://github.com/the-tcpdump-group/tcpdump/commit/bfc96b04831641376636337406aae7fe0fe65081
---
interface.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/interface.h b/interface.h
index b129312ab..0e35b7800 100644
--- a/interface.h
+++ b/interface.h
@@ -59,7 +59,7 @@ struct bpf_program;
* With Capsicum bpf_dump() may be not declared even if HAVE_BPF_DUMP is set.
*/
#if !defined(HAVE_BPF_DUMP) || \
- (defined(HAVE_BPF_DUMP) && HAVE_CAPSICUM && !defined(bpf_dump))
+ (defined(HAVE_BPF_DUMP) && defined(HAVE_CAPSICUM) && !defined(bpf_dump))
extern void bpf_dump(const struct bpf_program *, int);
#endif

View File

@ -3,7 +3,7 @@
Name: tcpdump Name: tcpdump
Epoch: 14 Epoch: 14
Version: 4.99.4 Version: 4.99.4
Release: 3 Release: 4
Summary: A network traffic monitoring tool Summary: A network traffic monitoring tool
License: BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSD-4-Clause-UC AND ISC AND NTP License: BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSD-4-Clause-UC AND ISC AND NTP
URL: http://www.tcpdump.org URL: http://www.tcpdump.org
@ -17,6 +17,7 @@ Patch1: backport-0003-Drop-root-priviledges-before-opening-first-savefil
Patch2: backport-0007-Introduce-nn-option.patch Patch2: backport-0007-Introduce-nn-option.patch
Patch3: backport-0009-Change-n-flag-to-nn-in-TESTonce.patch Patch3: backport-0009-Change-n-flag-to-nn-in-TESTonce.patch
Patch4: tcpdump-Add-sw64-architecture.patch Patch4: tcpdump-Add-sw64-architecture.patch
Patch5: backport-0010-Fix-a-not-defined-macro-error.patch
Requires(pre): shadow-utils Requires(pre): shadow-utils
BuildRequires: automake openssl-devel libpcap-devel git-core gcc make BuildRequires: automake openssl-devel libpcap-devel git-core gcc make
@ -88,6 +89,12 @@ make check
%{_mandir}/man8/tcpdump.8* %{_mandir}/man8/tcpdump.8*
%changelog %changelog
* Tue May 07 2024 xinghe <xinghe2@h-partners.com> - 14:4.99.4-4
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:fix a not defined macro error
* Sat Apr 20 2024 xinghe <xinghe2@h-partners.com> - 14:4.99.4-3 * Sat Apr 20 2024 xinghe <xinghe2@h-partners.com> - 14:4.99.4-3
- Type:bugfix - Type:bugfix
- CVE:NA - CVE:NA