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

Fix multiple definitions of struct mount_attr on recent glibc versions #14058

Merged
merged 1 commit into from
Oct 20, 2022

Conversation

ryao
Copy link
Contributor

@ryao ryao commented Oct 19, 2022

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 #14057

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]>
@behlendorf
Copy link
Contributor

behlendorf commented Oct 19, 2022

@youzhongyang would you mind taking a look at this.

@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Oct 19, 2022
@youzhongyang
Copy link
Contributor

Thanks. It looks good to me.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Oct 20, 2022
@behlendorf behlendorf merged commit 9650b35 into openzfs:master Oct 20, 2022
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Oct 21, 2022
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
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Oct 21, 2022
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
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Oct 21, 2022
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
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Oct 21, 2022
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
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Nov 9, 2022
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
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Nov 9, 2022
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
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Nov 9, 2022
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
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Nov 9, 2022
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
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.

Building master is broken by 2a068a1394d179dda4becf350e3afb4e8819675e
3 participants