Re: Mainline loongarch64 defconfig+Rust build error

From: Alice Ryhl
Date: Wed Dec 10 2025 - 20:35:04 EST


On Tue, Dec 09, 2025 at 08:20:46PM +0800, hev wrote:
> On Tue, Dec 9, 2025 at 6:58 PM Miguel Ojeda
> <miguel.ojeda.sandonis@xxxxxxxxx> wrote:
> >
> > Hi all,
> >
> > I am seeing in mainline loongarch64 defconfig+Rust the following build
> > error [1].
> >
> > Cheers,
> > Miguel
> >
> > [1]
> >
> > error[E0425]: cannot find value `compat_ptr_ioctl` in crate `bindings`
> > --> drivers/android/binder/rust_binder_main.rs:317:38
> > |
> > 317 | compat_ioctl: Some(bindings::compat_ptr_ioctl),
>
> It looks like the rust binder driver also needs to handle
> !CONFIG_COMPAT. Here's a reference for that:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/rust/kernel/miscdevice.rs?h=v6.18#n410

Yeah, it just needs a `#[cfg(CONFIG_COMPAT)] like miscdevice. Do you
want to add it? Otherwise I'll get to it soon.

Alice