Skip to content

Conversation

@pekkarr
Copy link

@pekkarr pekkarr commented Nov 6, 2025

Add support for m68k architecture.

Also make the ioctl generation use the same version of Linux headers as what's used by gen/src/main.rs (currently 6.17) which requires removing a reiserfs ioctl that has been removed from the kernel.

Generating bindings for m68k requires clang<21.1.0 because of a bug in bindgen as discussed in #173.

I'm not sure why the constness of the iov pointer in btrfs::btrfs_ioctl_encoded_io_args changes, but this seems to be due to some clang version differences (see commit cc98c6b).

cc @antoyo @glaubitz

Ioctls now use the same kernel version that's used in `gen/src/main.rs` for
generating other bindings. They are no longer based on any system-wide headers
which happen to exist in the system include directories.

This removes the `REISERFS_IOC_UNPACK` ioctl because reiserfs was removed from
the kernel and its userspace headers in Linux 6.13.
@pekkarr
Copy link
Author

pekkarr commented Nov 9, 2025

I made a workaround that makes bindgen work with new clang versions. The issue is also now fixed in bindgen but there's no new release with that yet.

The generated bindings now properly use the 2 byte alignment, which affects some type layouts such as __sifields in siginfo_t.

I used clang 22 for this which fixed the btrfs_ioctl_encoded_io_args issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant