diff options
| -rw-r--r-- | meta-oe/recipes-devtools/cbindgen/cbindgen/0001-Define-more-ioctl-codes-on-riscv32gc-unknown-linux-g.patch | 38 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/cbindgen/cbindgen_0.28.0.bb | 3 |
2 files changed, 40 insertions, 1 deletions
diff --git a/meta-oe/recipes-devtools/cbindgen/cbindgen/0001-Define-more-ioctl-codes-on-riscv32gc-unknown-linux-g.patch b/meta-oe/recipes-devtools/cbindgen/cbindgen/0001-Define-more-ioctl-codes-on-riscv32gc-unknown-linux-g.patch new file mode 100644 index 0000000000..75086aba75 --- /dev/null +++ b/meta-oe/recipes-devtools/cbindgen/cbindgen/0001-Define-more-ioctl-codes-on-riscv32gc-unknown-linux-g.patch | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | From 6ab6af57cbd3b3b0cd4ba04f7f65693e1ca69870 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Dan Gohman <dev@sunfishcode.online> | ||
| 3 | Date: Sun, 6 Apr 2025 05:22:49 -0700 | ||
| 4 | Subject: [PATCH] Define more ioctl codes on riscv32gc-unknown-linux-gnu | ||
| 5 | |||
| 6 | Define ioctl codes including `FICLONE` and `FS_IOC32_GETVERSION` on | ||
| 7 | riscv32gc-unknown-linux-gnu. | ||
| 8 | |||
| 9 | Upstream-Status: Submitted [https://github.com/rust-lang/libc/pull/4382] | ||
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 11 | --- | ||
| 12 | src/unix/linux_like/linux/arch/generic/mod.rs | 6 +++++- | ||
| 13 | 1 file changed, 5 insertions(+), 1 deletion(-) | ||
| 14 | |||
| 15 | diff --git a/src/unix/linux_like/linux/arch/generic/mod.rs b/src/unix/linux_like/linux/arch/generic/mod.rs | ||
| 16 | index 2f437e1..db1f1e7 100644 | ||
| 17 | --- a/src/unix/linux_like/linux/arch/generic/mod.rs | ||
| 18 | +++ b/src/unix/linux_like/linux/arch/generic/mod.rs | ||
| 19 | @@ -114,6 +114,7 @@ cfg_if! { | ||
| 20 | target_arch = "x86_64", | ||
| 21 | target_arch = "arm", | ||
| 22 | target_arch = "aarch64", | ||
| 23 | + target_arch = "riscv32", | ||
| 24 | target_arch = "riscv64", | ||
| 25 | target_arch = "s390x", | ||
| 26 | target_arch = "csky", | ||
| 27 | @@ -218,7 +219,10 @@ cfg_if! { | ||
| 28 | // where S stands for size (int, long, struct...) | ||
| 29 | // where T stands for type ('f','v','X'...) | ||
| 30 | // where N stands for NR (NumbeR) | ||
| 31 | - if #[cfg(any(target_arch = "x86", target_arch = "arm", target_arch = "csky"))] { | ||
| 32 | + if #[cfg(any(target_arch = "x86", | ||
| 33 | + target_arch = "arm", | ||
| 34 | + target_arch = "riscv32", | ||
| 35 | + target_arch = "csky"))] { | ||
| 36 | pub const FS_IOC_GETFLAGS: ::Ioctl = 0x80046601; | ||
| 37 | pub const FS_IOC_SETFLAGS: ::Ioctl = 0x40046602; | ||
| 38 | pub const FS_IOC_GETVERSION: ::Ioctl = 0x80047601; | ||
diff --git a/meta-oe/recipes-devtools/cbindgen/cbindgen_0.28.0.bb b/meta-oe/recipes-devtools/cbindgen/cbindgen_0.28.0.bb index 40436ef035..eb8556ebc6 100644 --- a/meta-oe/recipes-devtools/cbindgen/cbindgen_0.28.0.bb +++ b/meta-oe/recipes-devtools/cbindgen/cbindgen_0.28.0.bb | |||
| @@ -3,7 +3,8 @@ HOMEPAGE = "https://github.com/mozilla/cbindgen" | |||
| 3 | LICENSE = "MPL-2.0" | 3 | LICENSE = "MPL-2.0" |
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=9741c346eef56131163e13b9db1241b3" | 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=9741c346eef56131163e13b9db1241b3" |
| 5 | 5 | ||
| 6 | SRC_URI += "git://github.com/mozilla/cbindgen.git;protocol=https;branch=master" | 6 | SRC_URI += "git://github.com/mozilla/cbindgen.git;protocol=https;branch=master \ |
| 7 | file://0001-Define-more-ioctl-codes-on-riscv32gc-unknown-linux-g.patch;patchdir=${CARGO_VENDORING_DIRECTORY}/libc-0.2.155" | ||
| 7 | SRCREV = "bd78bbe59b10eda6ef1255e4acda95c56c6d0279" | 8 | SRCREV = "bd78bbe59b10eda6ef1255e4acda95c56c6d0279" |
| 8 | S = "${WORKDIR}/git" | 9 | S = "${WORKDIR}/git" |
| 9 | 10 | ||
