Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rust_binder: Fix build failure if !CONFIG_COMPAT

The bindgen utility cannot handle "#define compat_ptr_ioctl NULL" in the
C header, so we need to handle this case on our own.

Simply skip this field in the initializer when !CONFIG_COMPAT as the
SAFETY comment above this initializer implies this is allowed.

Reported-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Closes: https://lore.kernel.org/all/CANiq72mrVzqXnAV=Hy2XBOonLHA6YQgH-ckZoc_h0VBvTGK8rA@mail.gmail.com/
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20251209125029.1117897-1-xry111@xry111.site
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Xi Ruoyao and committed by
Greg Kroah-Hartman
174e2a33 46c549ef

+1
+1
drivers/android/binder/rust_binder_main.rs
··· 322 322 owner: THIS_MODULE.as_ptr(), 323 323 poll: Some(rust_binder_poll), 324 324 unlocked_ioctl: Some(rust_binder_ioctl), 325 + #[cfg(CONFIG_COMPAT)] 325 326 compat_ioctl: Some(bindings::compat_ptr_ioctl), 326 327 mmap: Some(rust_binder_mmap), 327 328 open: Some(rust_binder_open),