/usr/include/linux/mount.h:95:6: error: redeclaration of 'enum fsconfig_command'
95 | enum fsconfig_command {
| ^~~~~~~~~~~~~~~~
In file included from hd.c:18:
/usr/include/sys/mount.h:189:6: note: originally defined here
189 | enum fsconfig_command
| ^~~~~~~~~~~~~~~~
glibc 2.36 changelog says:
* On Linux, the fsopen, fsmount, move_mount, fsconfig, fspick, open_tree,
and mount_setattr have been added
Task
Compiling with glibc 2.36 fails with:
glibc 2.36 changelog says:
Solution
Make
linux/fs.h
inclusion conditional.