[masscan] - fix build on secondary arches

Dan Horák sharkcz at fedoraproject.org
Tue Jan 21 13:35:31 UTC 2014


commit dc7235238643825dea8e28124ec6e633691d3798
Author: Dan Horák <dan at danny.cz>
Date:   Tue Jan 21 14:35:46 2014 +0100

    - fix build on secondary arches

 masscan-1.0-secondary.patch |   12 ++++++++++++
 masscan.spec                |    7 ++++++-
 2 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/masscan-1.0-secondary.patch b/masscan-1.0-secondary.patch
new file mode 100644
index 0000000..ce1e9ec
--- /dev/null
+++ b/masscan-1.0-secondary.patch
@@ -0,0 +1,12 @@
+diff -up masscan-8746c78856ca9a4d20617dd5d234850a6136b0af/src/pixie-threads.h.secondary masscan-8746c78856ca9a4d20617dd5d234850a6136b0af/src/pixie-threads.h
+--- masscan-8746c78856ca9a4d20617dd5d234850a6136b0af/src/pixie-threads.h.secondary	2014-01-21 14:28:36.000000000 +0100
++++ masscan-8746c78856ca9a4d20617dd5d234850a6136b0af/src/pixie-threads.h	2014-01-21 14:29:11.000000000 +0100
+@@ -40,7 +40,7 @@ void pixie_locked_subtract_u32(unsigned
+ #define pixie_locked_CAS32(dst, src, expected) __sync_bool_compare_and_swap((volatile int*)(dst),(int)expected,(int)src);
+ #define pixie_locked_CAS64(dst, src, expected) __sync_bool_compare_and_swap((volatile long long int*)(dst),(long long int)expected,(long long int)src);
+ 
+-#if defined(__arm__)
++#if ! (defined(__i386__) || defined(__x86_64__))
+ #define rte_wmb() __sync_synchronize()
+ #define rte_rmb() __sync_synchronize()
+ #define rte_pause()
diff --git a/masscan.spec b/masscan.spec
index c23ff20..32a0fd1 100644
--- a/masscan.spec
+++ b/masscan.spec
@@ -2,11 +2,12 @@
 %global shortcommit %(c=%{commit}; echo ${c:0:7})
 Name:	masscan
 Version:	1.0
-Release:	7%{?dist}
+Release:	8%{?dist}
 Summary:	This is the fastest Internet port scanner
 License:	BSD
 URL:		https://github.com/robertdavidgraham/%{name}	
 Source0:	https://github.com/robertdavidgraham/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.zip
+Patch0:		%{name}-1.0-secondary.patch
 
 BuildRequires:	libpcap-devel
 
@@ -17,6 +18,7 @@ scanrand, unicornscan, and ZMap, using asynchronous transmission.
 
 %prep
 %setup -q -n %{name}-%{commit}
+%patch0 -p1 -b .secondary
 sed -i 's/\r$//' VULNINFO.md
 
 %build
@@ -35,6 +37,9 @@ install -pm 0755 bin/masscan %{buildroot}%{_bindir}/%{name}
 
 
 %changelog
+* Tue Jan 21 2014 Dan Horák <dan[at]danny.cz> - 1.0-8
+- fix build on secondary arches
+
 * Wed Jan 01 2014 Rino Rondan <villadalmine at fedoraproject.org> - 1.0-7
 - Change the description
 


More information about the scm-commits mailing list