Fix build failures with modern glibc (2.28+) and kernel headers#51
Open
noafroboy wants to merge 1 commit intoopen64-compiler:developfrom
Open
Fix build failures with modern glibc (2.28+) and kernel headers#51noafroboy wants to merge 1 commit intoopen64-compiler:developfrom
noafroboy wants to merge 1 commit intoopen64-compiler:developfrom
Conversation
Two compatibility issues prevent building on modern Linux distributions: 1. osprey/libf/fio/flush.c: Used _IO_NO_WRITES, a glibc-internal macro removed in glibc 2.28 (2018). Replace the writability check with an unconditional fflush(), which is safe per POSIX (returns 0 on a read-only stream). 2. osprey-gcc-4.2.0/gcc/config/i386/linux-unwind.h: Used deprecated 'struct siginfo' and 'struct ucontext' types removed in glibc 2.26+ and recent kernel headers. Replace with the POSIX-standard typedefs 'siginfo_t' and 'ucontext_t'. These fixes are needed on Ubuntu 20.04+ and other distributions shipping glibc >= 2.28. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_IO_NO_WRITESglibc internal macro inosprey/libf/fio/flush.cwith an unconditionalfflush()call (safe per POSIX — returns 0 on read-only streams)struct siginfoandstruct ucontexttypes inosprey-gcc-4.2.0/gcc/config/i386/linux-unwind.hwith the POSIX-standard typedefssiginfo_tanducontext_tMotivation
These two issues prevent building on any Linux distribution shipping glibc >= 2.28 (Ubuntu 18.10+, Debian 10+, Fedora 29+, etc.):
_IO_NO_WRITESwas a glibc-internal macro exposed through<stdio.h>internals, removed in glibc 2.28 (2018). The code used it to check stream writability before callingfflush(), butfflush()on a read-only stream is a no-op per POSIX, making the check unnecessary.struct siginfoandstruct ucontextwere deprecated in favor ofsiginfo_tanducontext_t(the POSIX typedefs) and removed from kernel UAPI headers. GCC upstream fixed this in 2018 but Open64's bundled GCC 4.2.0 still uses the old types.Test plan
🤖 Generated with Claude Code