-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
zfs-test/mmap_seek: fix build on musl #12891
Merged
Merged
Conversation
This file contains 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
6f90d23
to
e7b231b
Compare
it needs linux/fs.h for SEEK_DATA and friends without linux/fs.h: ``` mmap_seek.c mmap_seek.c: In function 'seek_data': mmap_seek.c:37:40: error: 'SEEK_DATA' undeclared (first use in this function); did you mean 'SEEK_SET'? 37 | off_t data_offset = lseek(fd, offset, SEEK_DATA); ``` also it needs sys/sysmacros.h for P2ROUNDUP without it: ``` mmap_seek.c: In function 'main': mmap_seek.c:122:19: warning: implicit declaration of function 'P2ROUNDUP' [-Wimplicit-function-declaration] 122 | seek_hole(fd, 0, P2ROUNDUP(file_size / 2, block_size)); | ^~~~~~~~~ powerpc64-gentoo-linux-musl/bin/ld: mmap_seek.o: in function `main': mmap_seek.c:(.text.startup+0x1b8): undefined reference to `P2ROUNDUP' powerpc64-gentoo-linux-musl/bin/ld: mmap_seek.c:(.text.startup+0x1d8): undefined reference to `P2ROUNDUP' powerpc64-gentoo-linux-musl/bin/ld: mmap_seek.c:(.text.startup+0x21c): undefined reference to `P2ROUNDUP' collect2: error: ld returned 1 exit status make[5]: *** [Makefile:754: mmap_seek] Error 1 ``` Closes: openzfs#12891 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
e7b231b
to
123c87b
Compare
behlendorf
approved these changes
Dec 20, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
For what it's worth I've sent a patch to musl adding those constants as well. |
gentoo-bot
pushed a commit
to gentoo/gentoo
that referenced
this pull request
Dec 21, 2021
PR: openzfs/zfs#12891 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
tonyhutter
pushed a commit
to tonyhutter/zfs
that referenced
this pull request
Feb 10, 2022
The build on musl needs linux/fs.h for SEEK_DATA and friends, and sys/sysmacros.h for P2ROUNDUP. Add the needed headers. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> Closes openzfs#12891
tonyhutter
pushed a commit
to tonyhutter/zfs
that referenced
this pull request
Feb 14, 2022
The build on musl needs linux/fs.h for SEEK_DATA and friends, and sys/sysmacros.h for P2ROUNDUP. Add the needed headers. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> Closes openzfs#12891
tonyhutter
pushed a commit
to tonyhutter/zfs
that referenced
this pull request
Feb 16, 2022
The build on musl needs linux/fs.h for SEEK_DATA and friends, and sys/sysmacros.h for P2ROUNDUP. Add the needed headers. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> Closes openzfs#12891
tonyhutter
pushed a commit
to tonyhutter/zfs
that referenced
this pull request
Feb 17, 2022
The build on musl needs linux/fs.h for SEEK_DATA and friends, and sys/sysmacros.h for P2ROUNDUP. Add the needed headers. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> Closes openzfs#12891
nicman23
pushed a commit
to nicman23/zfs
that referenced
this pull request
Aug 22, 2022
The build on musl needs linux/fs.h for SEEK_DATA and friends, and sys/sysmacros.h for P2ROUNDUP. Add the needed headers. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> Closes openzfs#12891
nicman23
pushed a commit
to nicman23/zfs
that referenced
this pull request
Aug 22, 2022
The build on musl needs linux/fs.h for SEEK_DATA and friends, and sys/sysmacros.h for P2ROUNDUP. Add the needed headers. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> Closes openzfs#12891
gentoo-repo-qa-bot
pushed a commit
to gentoo-mirror/linux-be
that referenced
this pull request
Jul 2, 2023
PR: openzfs/zfs#12891 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
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.
it needs linux/fs.h for SEEK_DATA and friends
Signed-off-by: Georgy Yakovlev gyakovlev@gentoo.org
Motivation and Context
zfs-2.1.2 fails to build on musl targets because of this change that added new test:
de198f2
Description
without linux/fs.h:
also it needs sys/sysmacros.h for P2ROUNDUP
without it:
How Has This Been Tested?
I applied my change and it now builds fine.
I have NOT tested if the test-suite actually works after it.
Types of changes
Checklist:
Signed-off-by
.