Bug 2148911

Summary: tftp: Port to strict(er) C99 compilers
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: tftpAssignee: Florian Weimer <fweimer>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dominik, jsynacek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tftp-5.2-39.fc38 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-02-05 17:20:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2137512    
Attachments:
Description Flags
tftp-c99.patch none

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