fix build error due to gcc 10
error: /usr/bin/ld: fping-socket4.o:/home/abuild/rpmbuild/BUILD/fping-4.2/src/fping.h:14: multiple definition of `random_data_flag'; fping-fping.o:/home/abuild/rpmbuild/BUILD/fping-4.2/src/fping.h:14: first defined here
This commit is contained in:
parent
fcaccbb840
commit
625176f910
@ -2,11 +2,12 @@
|
|||||||
|
|
||||||
Name: fping
|
Name: fping
|
||||||
Version: 4.2
|
Version: 4.2
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: fping is a program to send ICMP echo probes to network hosts
|
Summary: fping is a program to send ICMP echo probes to network hosts
|
||||||
License: BSD like
|
License: BSD like
|
||||||
URL: http://www.fping.org/
|
URL: http://www.fping.org/
|
||||||
Source0: http://www.fping.org/dist/%{name}-%{version}.tar.gz
|
Source0: http://www.fping.org/dist/%{name}-%{version}.tar.gz
|
||||||
|
Patch0: gcc-10.patch
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
|
|
||||||
@ -15,6 +16,7 @@ fping is a program to send ICMP echo probes to network hosts, similar to ping, b
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}/
|
%setup -q -n %{name}-%{version}/
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure
|
%configure
|
||||||
@ -37,6 +39,9 @@ fping is a program to send ICMP echo probes to network hosts, similar to ping, b
|
|||||||
%{_mandir}/*
|
%{_mandir}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jul 30 2021 linjiaxin5 <linjiaxin5@huawei.com> - 4.2-2
|
||||||
|
- Fix failure caused by GCC upgrade to 10
|
||||||
|
|
||||||
* Sun Mar 29 2020 Wei Xiong <myeuler@163.com>
|
* Sun Mar 29 2020 Wei Xiong <myeuler@163.com>
|
||||||
- Package init
|
- Package init
|
||||||
|
|
||||||
|
|||||||
11
gcc-10.patch
Normal file
11
gcc-10.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- a/src/fping.h 2021-08-03 15:44:55.282990658 +0800
|
||||||
|
+++ b/src/fping.h 2021-08-03 15:45:15.519338280 +0800
|
||||||
|
@@ -11,7 +11,7 @@
|
||||||
|
void crash_and_burn( char *message );
|
||||||
|
void errno_crash_and_burn( char *message );
|
||||||
|
int in_cksum( unsigned short *p, int n );
|
||||||
|
-int random_data_flag;
|
||||||
|
+extern int random_data_flag;
|
||||||
|
|
||||||
|
/* socket.c */
|
||||||
|
int open_ping_socket_ipv4();
|
||||||
Loading…
x
Reference in New Issue
Block a user