sunfishcode / linux-raw-sys

Generated bindings for Linux's userspace API
Other
49 stars 36 forks source link

Ioctl generation with linux HEAD fails #56

Open sunfishcode opened 1 year ago

sunfishcode commented 1 year ago

@joshtriplett As a followup to #53, I was investigating running the generator script with linux HEAD, but I'm hitting this error:

list.c: In function ‘list’:
include/linux/ext4.h:47:54: error: invalid application of ‘sizeof’ to incomplete type ‘struct compat_ext4_new_group_input’
   47 | #define EXT4_IOC32_GROUP_ADD            _IOW('f', 8, struct `)
      |                                                      ^~~~~~

It seems compat_ext4_new_group_input isn't defined in the uapi headers, but EXT4_IOC32_GROUP_ADD isn't usable without it. Should compat_ext4_new_group_input be moved into uapi?

joshtriplett commented 1 year ago

groan, you're right. There were issues with defining compat_ext4_new_group_input, so I ended up dropping it, and the kernel compiles without having a definition of it.

Does the generator script work if you don't request that ioctl? Or does this require fixing the header?

sunfishcode commented 1 year ago

Commenting out that one ioctl allows the script to succeed. I've now done that and published a 0.3.6-head.0 prerelease based on the current linux master branch.

joshtriplett commented 1 year ago

@sunfishcode Thank you!