-
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
Building master is broken by 2a068a1394d179dda4becf350e3afb4e8819675e #14057
Comments
The ifdef used would never work because the CPP is not aware of C structure definitions. Rather than use an autotools check, we can just use a nameless structure that we typedef to mount_attr_t. This is a Linux kernel interface, which means that it is stable and this is fine to do. Closes openzfs#14057 Signed-off-by: Richard Yao <[email protected]>
I am also confused, how could it pass all the builds, including my manual ones on newer and older kernels. Anyway your fix looks good. |
Older glibc versions that do not have a structure definition, so no problem would occur on them. The problem only occurs when the headers have the structure defined. |
I am not convinced. Here are output from 3 different systems:
I have no problem building on them. |
Do any of them use glibc 2.36? |
broken here as well, also on an affected glibc |
ok I see why now. On Ubuntu if I install libc6-dev 2.36, its /usr/include/x86_64-linux-gnu/sys/mount.h has these new lines which would bring in the definition of struct mount_attr:
|
That explains things nicely. Thanks for finding it. |
The ifdef used would never work because the CPP is not aware of C structure definitions. Rather than use an autotools check, we can just use a nameless structure that we typedef to mount_attr_t. This is a Linux kernel interface, which means that it is stable and this is fine to do. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Youzhong Yang <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes #14057 Closes #14058
The ifdef used would never work because the CPP is not aware of C structure definitions. Rather than use an autotools check, we can just use a nameless structure that we typedef to mount_attr_t. This is a Linux kernel interface, which means that it is stable and this is fine to do. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Youzhong Yang <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes openzfs#14057 Closes openzfs#14058
The ifdef used would never work because the CPP is not aware of C structure definitions. Rather than use an autotools check, we can just use a nameless structure that we typedef to mount_attr_t. This is a Linux kernel interface, which means that it is stable and this is fine to do. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Youzhong Yang <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes openzfs#14057 Closes openzfs#14058
The ifdef used would never work because the CPP is not aware of C structure definitions. Rather than use an autotools check, we can just use a nameless structure that we typedef to mount_attr_t. This is a Linux kernel interface, which means that it is stable and this is fine to do. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Youzhong Yang <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes openzfs#14057 Closes openzfs#14058
The ifdef used would never work because the CPP is not aware of C structure definitions. Rather than use an autotools check, we can just use a nameless structure that we typedef to mount_attr_t. This is a Linux kernel interface, which means that it is stable and this is fine to do. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Youzhong Yang <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes openzfs#14057 Closes openzfs#14058
The ifdef used would never work because the CPP is not aware of C structure definitions. Rather than use an autotools check, we can just use a nameless structure that we typedef to mount_attr_t. This is a Linux kernel interface, which means that it is stable and this is fine to do. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Youzhong Yang <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes openzfs#14057 Closes openzfs#14058
The ifdef used would never work because the CPP is not aware of C structure definitions. Rather than use an autotools check, we can just use a nameless structure that we typedef to mount_attr_t. This is a Linux kernel interface, which means that it is stable and this is fine to do. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Youzhong Yang <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes openzfs#14057 Closes openzfs#14058
The ifdef used would never work because the CPP is not aware of C structure definitions. Rather than use an autotools check, we can just use a nameless structure that we typedef to mount_attr_t. This is a Linux kernel interface, which means that it is stable and this is fine to do. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Youzhong Yang <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes openzfs#14057 Closes openzfs#14058
The ifdef used would never work because the CPP is not aware of C structure definitions. Rather than use an autotools check, we can just use a nameless structure that we typedef to mount_attr_t. This is a Linux kernel interface, which means that it is stable and this is fine to do. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Youzhong Yang <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes openzfs#14057 Closes openzfs#14058
System information
Describe the problem you're observing
Building master fails with:
Describe how to reproduce the problem
2a068a1 introduced this code.
The problem code is:
I am not sure how this was expected to work in the first place. You cannot use the CPP to check what C structures are defined. An autotools check is needed for that.
The text was updated successfully, but these errors were encountered: