Fix logic for detecting _libc_fpstate API #1232
Merged
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.
This fixes use of the incorrect libc API on x86 64-bit Linux, which was causing OpenEXR compilation to fail on the latest 64-bit Ubuntu.
See https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/x86/sys/ucontext.h which defines two different
_libc_fpstate
structs inside an#ifdef __x86_64__
I will note that I haven't attempted to test this change on all platforms, but it fixed a broken compile for me and I believe it makes more sense this way. The lines of code I'm changing here came from #798 and were copied from https://github.com/void-linux/void-packages/blob/80bbc168faa25448bd3399f4df331b836e74b85c/srcpkgs/ilmbase/patches/musl-_fpstate.patch.
If @pullmoll (original author of the Void Linux patch) has any comment I would appreciate it!