Fixed Wireshark detection in external projects using wireshark.m4 script
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
This commit is contained in:
parent
2304af6862
commit
8676769506
@ -0,0 +1,41 @@
|
|||||||
|
From: Patrick Monnerat <patrick.monnerat@dh.com>
|
||||||
|
Date: Fri, 23 Oct 2015 11:23:11 -0400
|
||||||
|
Subject: [PATCH] Patch fixing the wireshark autoconf macros.
|
||||||
|
|
||||||
|
When configuring a project using a wireshark detection macro on a 64-bit
|
||||||
|
system, the detection fails because a configuration test program
|
||||||
|
crashes.
|
||||||
|
|
||||||
|
epan/epan.h include is missing in configuration test program. This is
|
||||||
|
needed to define epan_get_version() as char *. Failure to doing so uses
|
||||||
|
a 32-bit integer as a string address --> segfault.
|
||||||
|
|
||||||
|
diff --git a/wireshark.m4 b/wireshark.m4
|
||||||
|
index d8015d8..6d7b177 100644
|
||||||
|
--- a/wireshark.m4
|
||||||
|
+++ b/wireshark.m4
|
||||||
|
@@ -33,6 +33,7 @@ AC_DEFUN([AM_PATH_WIRESHARK],[
|
||||||
|
#include <gmodule.h>
|
||||||
|
#include <epan/packet.h>
|
||||||
|
#include <epan/prefs.h>
|
||||||
|
+#include <epan/epan.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main()
|
||||||
|
@@ -40,7 +41,7 @@ main()
|
||||||
|
{
|
||||||
|
int ws_major_version, ws_minor_version, ws_micro_version;
|
||||||
|
int major, minor, micro;
|
||||||
|
- char **tmp_version;
|
||||||
|
+ char *tmp_version;
|
||||||
|
|
||||||
|
tmp_version = (char *) strdup("$min_wireshark_version");
|
||||||
|
major = 0;
|
||||||
|
@@ -76,6 +77,7 @@ main()
|
||||||
|
#include <gmodule.h>
|
||||||
|
#include <epan/packet.h>
|
||||||
|
#include <epan/prefs.h>
|
||||||
|
+#include <epan/epan.h>
|
||||||
|
], [puts(epan_get_version());])], [WIRESHARK_VERSION=`./conftest$ac_exeext`],
|
||||||
|
wireshark_found=no)
|
||||||
|
|
@ -21,7 +21,7 @@
|
|||||||
Summary: Network traffic analyzer
|
Summary: Network traffic analyzer
|
||||||
Name: wireshark
|
Name: wireshark
|
||||||
Version: 1.12.8
|
Version: 1.12.8
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPL+
|
License: GPL+
|
||||||
Group: Applications/Internet
|
Group: Applications/Internet
|
||||||
Source0: http://wireshark.org/download/src/%{name}-%{version}.tar.bz2
|
Source0: http://wireshark.org/download/src/%{name}-%{version}.tar.bz2
|
||||||
@ -46,6 +46,8 @@ Patch8: wireshark-0008-move-default-temporary-directory-to-var-tmp.patch
|
|||||||
Patch9: wireshark-0009-Fix-paths-in-a-wireshark.desktop-file.patch
|
Patch9: wireshark-0009-Fix-paths-in-a-wireshark.desktop-file.patch
|
||||||
# Backported from upstream - https://code.wireshark.org/review/#/c/10015/
|
# Backported from upstream - https://code.wireshark.org/review/#/c/10015/
|
||||||
Patch10: wireshark-0010-Allow-redefining-all-ports-for-RADIUS.patch
|
Patch10: wireshark-0010-Allow-redefining-all-ports-for-RADIUS.patch
|
||||||
|
# Fedora-specific, see https://bugzilla.redhat.com/1274831
|
||||||
|
Patch11: wireshark-0011-Patch-fixing-the-wireshark-autoconf-macros.patch
|
||||||
|
|
||||||
Url: http://www.wireshark.org/
|
Url: http://www.wireshark.org/
|
||||||
BuildRequires: libpcap-devel >= 0.9
|
BuildRequires: libpcap-devel >= 0.9
|
||||||
@ -169,6 +171,7 @@ Cflags: -I\${includedir}" > wireshark.pc.in
|
|||||||
%patch8 -p1 -b .tmp_dir
|
%patch8 -p1 -b .tmp_dir
|
||||||
%patch9 -p1 -b .fix_paths
|
%patch9 -p1 -b .fix_paths
|
||||||
%patch10 -p1 -b .radius_ports
|
%patch10 -p1 -b .radius_ports
|
||||||
|
%patch11 -p1 -b .64bit
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%ifarch s390 s390x sparcv9 sparc64
|
%ifarch s390 s390x sparcv9 sparc64
|
||||||
@ -409,6 +412,10 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
|
|||||||
%{_datadir}/aclocal/*
|
%{_datadir}/aclocal/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 3 2015 Peter Lemenkov <lemenkov@gmail.com> - 1.12.8-2
|
||||||
|
- Fixed Wireshark detection in external projects using wireshark.m4 script.
|
||||||
|
See https://bugzilla.redhat.com/1274831 for further details.
|
||||||
|
|
||||||
* Thu Oct 15 2015 Peter Hatina <phatina@redhat.com> - 1.12.8-1
|
* Thu Oct 15 2015 Peter Hatina <phatina@redhat.com> - 1.12.8-1
|
||||||
- Ver. 1.12.8
|
- Ver. 1.12.8
|
||||||
- Dropped patch no. 10 (applied upstream)
|
- Dropped patch no. 10 (applied upstream)
|
||||||
|
Loading…
Reference in New Issue
Block a user