!5 fix build error with gcc 10

From: @eaglegai
Reviewed-by: @zengwefeng
Signed-off-by: @zengwefeng
This commit is contained in:
openeuler-ci-bot 2021-07-30 03:34:05 +00:00 committed by Gitee
commit c9038ce96b
2 changed files with 20 additions and 1 deletions

12
tftp-hpa-5.2-gcc10.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up tftp-hpa-5.2/tftp/tftp.c.gcc10 tftp-hpa-5.2/tftp/tftp.c
--- tftp-hpa-5.2/tftp/tftp.c.gcc10 2020-05-04 00:56:28.787896509 +0200
+++ tftp-hpa-5.2/tftp/tftp.c 2020-05-04 00:58:42.502901005 +0200
@@ -48,7 +48,7 @@ extern int maxtimeout;
#define PKTSIZE SEGSIZE+4
char ackbuf[PKTSIZE];
int timeout;
-sigjmp_buf toplevel;
+extern sigjmp_buf toplevel;
sigjmp_buf timeoutbuf;
static void nak(int, const char *);

View File

@ -1,6 +1,6 @@
Name: tftp
Version: 5.2
Release: 29
Release: 30
Summary: The client for the Trivial File Transfer Protocol (TFTP)
License: BSD
Group: Applications/Internet
@ -18,6 +18,7 @@ Patch0007: tftp-hpa-0.49-stats.patch
Patch0008: tftp-hpa-5.2-pktinfo.patch
Patch0009: tftp-doc.patch
Patch0010: tftp-enhanced-logging.patch
Patch0011: tftp-hpa-5.2-gcc10.patch
BuildRequires: readline-devel autoconf systemd-units
BuildRequires: gcc
@ -85,6 +86,12 @@ install -p -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}
%changelog
* Fri Jul 30 2021 gaihuiying <gaihuiying1@huawei.com> - 5.2-30
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix build error with gcc 10
* Thu May 27 2021 lijingyuan <lijingyuan3@huawei.com> - 5.2-29
- Type:bugfix
- ID:NA