Bug 2148911 - tftp: Port to strict(er) C99 compilers
Summary: tftp: Port to strict(er) C99 compilers
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: tftp
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Florian Weimer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PortingToModernCHelpNeeded
TreeView+ depends on / blocked
 
Reported: 2022-11-28 10:41 UTC by Florian Weimer
Modified: 2023-02-05 17:20 UTC (History)
2 users (show)

Fixed In Version: tftp-5.2-39.fc38
Clone Of:
Environment:
Last Closed: 2023-02-05 17:20:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
tftp-c99.patch (1.46 KB, patch)
2023-02-05 17:13 UTC, Florian Weimer
no flags Details | Diff

Description Florian Weimer 2022-11-28 10:41:16 UTC
I looked at what is required to build tftp in C99 mode. The issue is that autoreconf ends up defining _GNU_SOURCE, and due to the way <signal.h> in glibc works today, that makes bsd_signal unavailable. This results in an implicit function declaration in various source files, and future compilers will reject that by default with an error.

I proposed to change that on the glibc side:

[PATCH] <signal.h>: Make bsd_signal available with _GNU_SOURCE
<https://sourceware.org/pipermail/libc-alpha/2022-November/143616.html>

If that doesn't work out, we may have to patch tftp to call the signal function instead of bsd_signal. They are equivalent for glibc.

Comment 1 Dominik 'Rathann' Mierzejewski 2022-11-28 10:52:54 UTC
Thanks for the early heads-up. The change looks trivial to make in tftp. Let's keep an eye on that glibc thread.

Comment 2 Florian Weimer 2023-02-05 17:12:52 UTC
The glibc fix is not forthcoming, so I'll patch this package directly.

Comment 3 Florian Weimer 2023-02-05 17:13:20 UTC
Created attachment 1942367 [details]
tftp-c99.patch


Note You need to log in before you can comment on or make changes to this bug.