Fix BSD-specific types on Linux for aarch64 #329
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.
Problem
The recent addition of aarch64 fenv support in #319 (commit 1eeb139) introduced BSD-specific types (
__uint64_tand__uint32_t) that are not defined on Linux systems. This causes compilation failures on aarch64-linux targets.Solution
This PR replaces BSD-specific types with standard C99 types:
__uint64_t→uint64_t__uint32_t→uint32_tThese standard types are available on all platforms through the included
<stdint.h>header.Additionally, this fixes the initialization of
__fe_dfl_envfrom scalar0to{0}to match the typedef as a non-scalar type.Testing
Tested successfully with BinaryBuilder.jl on:
This resolves the build failures reported in JuliaPackaging/Yggdrasil#11347
Changes
__uint64_twithuint64_tininclude/openlibm_fenv_aarch64.h__uint32_twithuint32_tininclude/openlibm_fenv_aarch64.h__fe_dfl_envinaarch64/fenv.cfrom= 0to= {0}