-
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
Use <fcntl.h> instead of <sys/fcntl.h> #15925
Conversation
17c9384
to
68419c7
Compare
68419c7
to
2cb0a4e
Compare
@thesamesam is there any reason this is still marked as a draft? |
Completely forgot. I've got a busy few days but I'll put this on my list to come back to. I need to double check if there's any other missing includes and whether they need a guard - there was one I dropped which it turns out is needed for the kernel build but is wrong for the userland build, or something like that. |
@thesamesam if this is still needed can you rebase this and mark it ready for review. |
The snag when I last looked was something about getting the include right for the module vs the userland side, I'll look on the weekend - sorry for keeping you waiting. |
6dea23b
to
70f6a00
Compare
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.
Makes sense. Can you just remove the draft status from this PR and update the commit comment to address the make checkstyle
warnings.
Whoops -- something about this PR is cursed :) Thank you for your patience again. I'm sorry for being a snail on this -- my only musl system wasn't very accessible and I ended up making some bad assumptions about something else I'd seen when it turns out it was unrelated. |
33e1f4a
to
333b422
Compare
When building on musl, we get: ``` In file included from tests/zfs-tests/cmd/getversion.c:22: /usr/include/sys/fcntl.h:1:2: error: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Werror=cpp] 1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> In file included from module/os/linux/zfs/vdev_file.c:36: /usr/include/sys/fcntl.h:1:2: error: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Werror=cpp] 1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> ``` Bug: https://bugs.gentoo.org/925235 Signed-off-by: Sam James <sam@gentoo.org>
481c41e
to
03809c8
Compare
When building on musl, we get: ``` In file included from tests/zfs-tests/cmd/getversion.c:22: /usr/include/sys/fcntl.h:1:2: error: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Werror=cpp] 1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> In file included from module/os/linux/zfs/vdev_file.c:36: /usr/include/sys/fcntl.h:1:2: error: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Werror=cpp] 1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> ``` Bug: https://bugs.gentoo.org/925235 Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Sam James <sam@gentoo.org> Closes openzfs#15925
Motivation and Context
<sys/fcntl.h>
is deprecated and triggers a warning (-> error) on musl.Bug: https://bugs.gentoo.org/925235
Description
When building on musl, we get:
How Has This Been Tested?
Tested on musl and glibc on amd64.
Types of changes
Checklist:
Signed-off-by
.