mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 16:45:49 +01:00
mercurial: add patch to fix the libc buffer type for aarch64-linux
This commit is contained in:
parent
1a268c42c8
commit
e2d6f416d5
2 changed files with 17 additions and 0 deletions
|
@ -28,6 +28,11 @@ let
|
|||
sha256 = "sha256-hvmGReRWWpJWmR3N4it3uOfSLKb7tgwfTNvYRpo4zB8=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix the type of libc buffer for aarch64-linux
|
||||
./fix-rhg-type-aarch64.patch
|
||||
];
|
||||
|
||||
format = "other";
|
||||
|
||||
passthru = { inherit python; }; # pass it so that the same version can be used in hg2git
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
diff --git a/rust/hg-core/src/lock.rs b/rust/hg-core/src/lock.rs
|
||||
--- a/rust/hg-core/src/lock.rs
|
||||
+++ b/rust/hg-core/src/lock.rs
|
||||
@@ -145,7 +145,7 @@ lazy_static::lazy_static! {
|
||||
|
||||
/// Same as https://github.com/python/cpython/blob/v3.10.0/Modules/socketmodule.c#L5414
|
||||
const BUFFER_SIZE: usize = 1024;
|
||||
- let mut buffer = [0_i8; BUFFER_SIZE];
|
||||
+ let mut buffer = [0 as libc::c_char; BUFFER_SIZE];
|
||||
let hostname_bytes = unsafe {
|
||||
let result = libc::gethostname(buffer.as_mut_ptr(), BUFFER_SIZE);
|
||||
if result != 0 {
|
Loading…
Reference in a new issue