fix build with gcc 10 (#1800195)

This commit is contained in:
Dominik 'Rathann' Mierzejewski 2020-05-04 01:03:07 +02:00
parent d86ae453bd
commit 5e2aa55b68
2 changed files with 18 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

@ -4,7 +4,7 @@
Summary: The client for the Trivial File Transfer Protocol (TFTP)
Name: tftp
Version: 5.2
Release: 29%{?dist}
Release: 30%{?dist}
License: BSD
URL: http://www.kernel.org/pub/software/network/tftp/
Source0: http://www.kernel.org/pub/software/network/tftp/tftp-hpa/tftp-hpa-%{version}.tar.bz2
@ -21,6 +21,7 @@ Patch7: tftp-hpa-0.49-stats.patch
Patch8: tftp-hpa-5.2-pktinfo.patch
Patch9: tftp-doc.patch
Patch10: tftp-enhanced-logging.patch
Patch11: tftp-hpa-5.2-gcc10.patch
BuildRequires: gcc
BuildRequires: readline-devel autoconf systemd-units
@ -58,6 +59,7 @@ systemd socket activation, and is disabled by default.
%patch8 -p1 -b .pktinfo
%patch9 -p1 -b .doc
%patch10 -p1 -b .logging
%patch11 -p1 -b .gcc10
%build
autoreconf
@ -100,6 +102,9 @@ install -p -m 644 %SOURCE2 ${RPM_BUILD_ROOT}%{_unitdir}
%{_unitdir}/*
%changelog
* Sun May 03 2020 Dominik Mierzejewski <rpm@greysector.net> - 5.2-30
- fix build with gcc 10 (#1800195)
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.2-29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild