HomeFreeBSD

Fix multiple definitions of struct mount_attr on recent glibc versions

Description

Fix multiple definitions of struct mount_attr on recent glibc versions

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 <behlendorf1@llnl.gov>
Reviewed-by: Youzhong Yang <yyang@mathworks.com>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14057
Closes #14058

Details

Provenance
Richard Yao <richard.yao@alumni.stonybrook.edu>Authored on Oct 20 2022, 4:12 PM
GitHub <noreply@github.com>Committed on Oct 20 2022, 4:12 PM
Parents
rG411d327c6762: Add defensive assertion to vdev_queue_aggregate()
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG9650b35e95dd: Fix multiple definitions of struct mount_attr on recent glibc versions (authored by Richard Yao <richard.yao@alumni.stonybrook.edu>).Oct 20 2022, 4:12 PM