the package buildable with GCC 14 [boo#1225935] OBS-URL: https://build.opensuse.org/package/show/network/tftp?expand=0&rev=60
51 lines
1.5 KiB
Diff
51 lines
1.5 KiB
Diff
The glibc headers do not declare bsd_signal by default. Call signal
|
|
instead, which is the same function as bsd_signal in current glibc.
|
|
|
|
This fixes implicit function declarations and avoids build issues with
|
|
future compilers.
|
|
|
|
Index: tftp-hpa-5.2/tftp/main.c
|
|
===================================================================
|
|
--- tftp-hpa-5.2.orig/tftp/main.c
|
|
+++ tftp-hpa-5.2/tftp/main.c
|
|
@@ -306,7 +306,7 @@ int main(int argc, char *argv[])
|
|
sp->s_proto = (char *)"udp";
|
|
}
|
|
|
|
- bsd_signal(SIGINT, intr);
|
|
+ signal(SIGINT, intr);
|
|
|
|
if (peerargc > 1) {
|
|
/* Set peer */
|
|
@@ -772,7 +772,7 @@ void intr(int sig)
|
|
{
|
|
(void)sig; /* Quiet unused warning */
|
|
|
|
- bsd_signal(SIGALRM, SIG_IGN);
|
|
+ signal(SIGALRM, SIG_IGN);
|
|
alarm(0);
|
|
siglongjmp(toplevel, -1);
|
|
}
|
|
Index: tftp-hpa-5.2/tftp/tftp.c
|
|
===================================================================
|
|
--- tftp-hpa-5.2.orig/tftp/tftp.c
|
|
+++ tftp-hpa-5.2/tftp/tftp.c
|
|
@@ -85,7 +85,7 @@ void tftp_sendfile(int fd, const char *n
|
|
is_request = 1; /* First packet is the actual WRQ */
|
|
amount = 0;
|
|
|
|
- bsd_signal(SIGALRM, timer);
|
|
+ signal(SIGALRM, timer);
|
|
do {
|
|
if (is_request) {
|
|
size = makerequest(WRQ, name, dp, mode) - 4;
|
|
@@ -191,7 +191,7 @@ void tftp_recvfile(int fd, const char *n
|
|
firsttrip = 1;
|
|
amount = 0;
|
|
|
|
- bsd_signal(SIGALRM, timer);
|
|
+ signal(SIGALRM, timer);
|
|
do {
|
|
if (firsttrip) {
|
|
size = makerequest(RRQ, name, ap, mode);
|