0001-uucore-add-support-for-sparc64.patch 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. From 9f4330f94cc471d880df7d9089ee1105b27fd321 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Sat, 6 Jan 2024 10:26:54 +0100
  4. Subject: [PATCH] uucore: add support for sparc64
  5. Add support for sparc64 in uucore to avoid the following build failure
  6. with nushell:
  7. error[E0308]: mismatched types
  8. --> /home/autobuild/autobuild/instance-7/output-1/build/nushell-0.85.0/VENDOR/uucore/src/lib/features/fs.rs:121:16
  9. |
  10. 111 | pub fn number_of_links(&self) -> u64 {
  11. | --- expected `u64` because of return type
  12. ...
  13. 121 | return self.0.st_nlink;
  14. | ^^^^^^^^^^^^^^^ expected `u64`, found `u32`
  15. |
  16. help: you can convert a `u32` to a `u64`
  17. |
  18. 121 | return self.0.st_nlink.into();
  19. | +++++++
  20. For more information about this error, try `rustc --explain E0308`.
  21. error: could not compile `uucore` (lib) due to previous error
  22. Fixes:
  23. - http://autobuild.buildroot.org/results/f9f0287a8e39c65895014ca513ed25071f020add
  24. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  25. Upstream: https://github.com/uutils/coreutils/commit/d158f1a396d19cc2aed68131b80ec3b7325d108e
  26. ---
  27. src/uucore/src/lib/features/fs.rs | 2 ++
  28. 1 file changed, 2 insertions(+)
  29. diff --git a/VENDOR/uucore/src/lib/features/fs.rs b/VENDOR/uucore/src/lib/features/fs.rs
  30. index 20cc9e13d..3b9170bc3 100644
  31. --- a/VENDOR/uucore/src/lib/features/fs.rs
  32. +++ b/VENDOR/uucore/src/lib/features/fs.rs
  33. @@ -121,6 +121,7 @@ impl FileInformation {
  34. not(target_os = "solaris"),
  35. not(target_arch = "aarch64"),
  36. not(target_arch = "riscv64"),
  37. + not(target_arch = "sparc64"),
  38. target_pointer_width = "64"
  39. ))]
  40. return self.0.st_nlink;
  41. @@ -137,6 +138,7 @@ impl FileInformation {
  42. target_os = "solaris",
  43. target_arch = "aarch64",
  44. target_arch = "riscv64",
  45. + target_arch = "sparc64",
  46. not(target_pointer_width = "64")
  47. )
  48. ))]
  49. --
  50. 2.43.0