[tcpflow] fix build on arches without cpuid instruction

Dan Horák sharkcz at fedoraproject.org
Thu Feb 16 14:44:19 UTC 2012


commit 65f701c9b2ce239b61d1555b131fa183cec4f4d6
Author: Dan Horák <dan at danny.cz>
Date:   Thu Feb 16 15:44:06 2012 +0100

    fix build on arches without cpuid instruction

 tcpflow-1.1.0-asm.patch |   19 +++++++++++++++++++
 tcpflow.spec            |    7 ++++++-
 2 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/tcpflow-1.1.0-asm.patch b/tcpflow-1.1.0-asm.patch
new file mode 100644
index 0000000..9b2338a
--- /dev/null
+++ b/tcpflow-1.1.0-asm.patch
@@ -0,0 +1,19 @@
+diff -up tcpflow-1.1.0/src/xml.cpp.asm tcpflow-1.1.0/src/xml.cpp
+--- tcpflow-1.1.0/src/xml.cpp.asm	2012-02-16 14:20:02.000000000 +0100
++++ tcpflow-1.1.0/src/xml.cpp	2012-02-16 14:20:41.000000000 +0100
+@@ -440,6 +440,7 @@ void xml::pop()
+ 
+ void xml::cpuid(uint32_t op, unsigned long *eax, unsigned long *ebx,
+                 unsigned long *ecx, unsigned long *edx) {
++#ifdef HAVE_ASM_CPUID
+ #if defined(__i386__) && defined(__PIC__)
+     __asm__ __volatile__("pushl %%ebx      \n\t" /* save %ebx */
+                          "cpuid            \n\t"
+@@ -455,6 +456,7 @@ void xml::cpuid(uint32_t op, unsigned lo
+                          : "cc");
+ 
+ #endif
++#endif
+ }
+ 
+ 
diff --git a/tcpflow.spec b/tcpflow.spec
index 1dc4e39..b92ef36 100644
--- a/tcpflow.spec
+++ b/tcpflow.spec
@@ -1,11 +1,12 @@
 Summary:       Network traffic recorder
 Name:          tcpflow
 Version:       1.1.0
-Release:       1%{?dist}
+Release:       2%{?dist}
 License:       GPL+
 Group:         Applications/Internet
 URL:           http://afflib.org/software/tcpflow/
 Source0:       http://afflib.org/downloads/tcpflow-%{version}.tar.gz
+Patch0:        tcpflow-1.1.0-asm.patch
 BuildRequires: libpcap-devel
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 %description
@@ -19,6 +20,7 @@ separate file for later analysis.
 
 %prep
 %setup -q
+%patch0 -p1 -b .asm
 %{__chmod} 0644 COPYING
 
 %build
@@ -42,6 +44,9 @@ separate file for later analysis.
 %{_mandir}/man1/%{name}*
 
 %changelog
+* Thu Feb 16 2012 Dan Horák <dan[at]danny.cz> - 1.1.0-2
+- fix build on arches without cpuid instruction
+
 * Mon Jan 30 2012 Terje Rosten <terje.rosten at ntnu.no> - 1.1.0-1
 - 1.1.0
 


More information about the scm-commits mailing list