Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readmmap.c: fix building with MUSL libc #15130

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

zdykstra
Copy link
Contributor

@zdykstra zdykstra commented Aug 1, 2023

Motivation and Context

Fix building readmmap.c with MUSL libc.

Description

glibc includes sys/types.h from stdlib.h. This is not the case for MUSL, so explicitly include it.

How Has This Been Tested?

Tested using Void's cross-compiling infrastructure - https://github.com/void-linux/void-packages/pull/45365/checks

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

glibc includes sys/types.h from stdlib.h. This is not the case for MUSL,
so explicitly include it. Fixes usage of uint_t.

Signed-off-by: Zach Dykstra <[email protected]>
Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for testing with MUSL libc. Out of curiosity was this the only build issue you ran in to with the 2.2.0 release candidates? I'd like to include any additional minor fixes in the next 2.2.0-rc4 tag if possible.

@behlendorf behlendorf added the Status: Accepted Ready to integrate (reviewed, tested) label Aug 1, 2023
@behlendorf behlendorf merged commit fcd61d9 into openzfs:master Aug 1, 2023
17 of 19 checks passed
@zdykstra zdykstra deleted the fix-readmmap-musl branch August 1, 2023 16:01
@zdykstra
Copy link
Contributor Author

zdykstra commented Aug 1, 2023

That was the only issue I hit when building 2.2.0-rc3 with MUSL - though I haven't actually tested the build product.

behlendorf pushed a commit to behlendorf/zfs that referenced this pull request Aug 1, 2023
glibc includes sys/types.h from stdlib.h. This is not the case for MUSL,
so explicitly include it. Fixes usage of uint_t.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Zach Dykstra <[email protected]>
Closes openzfs#15130
behlendorf pushed a commit that referenced this pull request Aug 2, 2023
glibc includes sys/types.h from stdlib.h. This is not the case for MUSL,
so explicitly include it. Fixes usage of uint_t.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Zach Dykstra <[email protected]>
Closes #15130
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Dec 12, 2023
glibc includes sys/types.h from stdlib.h. This is not the case for MUSL,
so explicitly include it. Fixes usage of uint_t.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Zach Dykstra <[email protected]>
Closes openzfs#15130
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants