From faf0321da9026bece431d235d4596a502959239c Mon Sep 17 00:00:00 2001 From: eaglegai Date: Fri, 30 Jul 2021 11:24:44 +0800 Subject: [PATCH] fix build error with gcc 10 --- tftp-hpa-5.2-gcc10.patch | 12 ++++++++++++ tftp.spec | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 tftp-hpa-5.2-gcc10.patch diff --git a/tftp-hpa-5.2-gcc10.patch b/tftp-hpa-5.2-gcc10.patch new file mode 100644 index 0000000..0ff4a41 --- /dev/null +++ b/tftp-hpa-5.2-gcc10.patch @@ -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 *); diff --git a/tftp.spec b/tftp.spec index b5d4f0e..9886b06 100644 --- a/tftp.spec +++ b/tftp.spec @@ -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 - 5.2-30 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix build error with gcc 10 + * Thu May 27 2021 lijingyuan - 5.2-29 - Type:bugfix - ID:NA