summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-python/recipes-devtools/python/python3-pyruvate
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-python/recipes-devtools/python/python3-pyruvate')
-rw-r--r--meta-openembedded/meta-python/recipes-devtools/python/python3-pyruvate/0001-check-for-mips-targets-for-stat.st_dev-definitions.patch45
-rw-r--r--meta-openembedded/meta-python/recipes-devtools/python/python3-pyruvate/0001-riscv64-mod.rs-Add-missing-error-codes.patch32
2 files changed, 77 insertions, 0 deletions
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyruvate/0001-check-for-mips-targets-for-stat.st_dev-definitions.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyruvate/0001-check-for-mips-targets-for-stat.st_dev-definitions.patch
new file mode 100644
index 0000000000..f41e6cf116
--- /dev/null
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyruvate/0001-check-for-mips-targets-for-stat.st_dev-definitions.patch
@@ -0,0 +1,45 @@
+From 56984b19469ff5b69b8b8e180dc75cf825bb1123 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 25 Jan 2022 22:28:11 -0800
+Subject: [PATCH] check for mips targets for stat.st_dev definitions
+
+st_dev has wrong type in glibc when using mips/O32 ABI
+its type should be dev_t but it is set to unsigned long int
+this is specific issue on mips/o32 ABI in glibc for details
+
+See
+https://sourceware.org/bugzilla/show_bug.cgi?id=17786
+
+currently the build fails on mips archirecture with type mismatches
+
+ Fixes
+ error[E0308]: mismatched types
+* --> /usr/src/debug/python3-pyruvate/1.1.2-r0/cargo_home/bitbake/libsystemd-0.4.1/src/logging.rs:296:25
+ |
+ 296 | device: stat.st_dev,
+ | ^^^^^^^^^^^ expected `u64`, found `u32`
+
+Upstream-Status: Submitted [https://github.com/lucab/libsystemd-rs/pull/103]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/logging.rs | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/logging.rs b/src/logging.rs
+index a68c36a..6e374ae 100644
+--- a/src/logging.rs
++++ b/src/logging.rs
+@@ -292,7 +292,10 @@ impl JournalStream {
+ pub fn from_fd<F: AsRawFd>(fd: F) -> std::io::Result<Self> {
+ nix::sys::stat::fstat(fd.as_raw_fd())
+ .map(|stat| JournalStream {
++ #[cfg(not(target_arch = "mips"))]
+ device: stat.st_dev,
++ #[cfg(target_arch = "mips")]
++ device: stat.st_dev as u64,
+ inode: stat.st_ino,
+ })
+ .map_err(std::io::Error::from)
+--
+2.35.0
+
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyruvate/0001-riscv64-mod.rs-Add-missing-error-codes.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyruvate/0001-riscv64-mod.rs-Add-missing-error-codes.patch
new file mode 100644
index 0000000000..67108472ac
--- /dev/null
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyruvate/0001-riscv64-mod.rs-Add-missing-error-codes.patch
@@ -0,0 +1,32 @@
+From c711fb215de54f960a35cdc48cd506b6b5db4918 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 26 Jan 2022 11:50:58 -0800
+Subject: [PATCH] riscv64/mod.rs: Add missing error codes
+
+These are flagged by apps e.g. python3-pyruvate
+
+Upstream-Status: Submitted [https://github.com/rust-lang/libc/pull/2656]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/unix/linux_like/linux/musl/b64/riscv64/mod.rs | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs b/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs
+index b075b4a05..6b17621c7 100644
+--- a/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs
++++ b/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs
+@@ -548,6 +548,11 @@ pub const EHOSTUNREACH: ::c_int = 113;
+ pub const EALREADY: ::c_int = 114;
+ pub const EINPROGRESS: ::c_int = 115;
+ pub const ESTALE: ::c_int = 116;
++pub const EUCLEAN: ::c_int = 117;
++pub const ENOTNAM: ::c_int = 118;
++pub const ENAVAIL: ::c_int = 119;
++pub const EISNAM: ::c_int = 120;
++pub const EREMOTEIO: ::c_int = 121;
+ pub const EDQUOT: ::c_int = 122;
+ pub const ENOMEDIUM: ::c_int = 123;
+ pub const EMEDIUMTYPE: ::c_int = 124;
+--
+2.35.0
+