diff options
author | Luke Granger-Brown <git@lukegb.com> | 2022-03-14 15:13:34 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-14 15:13:34 +0000 |
commit | a0bbd640b8b637e29b04cef0f1ea60f1650e1e75 (patch) | |
tree | 6c3280c171154c031f4d7e937887c32b831e6b13 /pkgs/applications | |
parent | 2b45304003b1272b23b51869bbdecfcf76420d68 (diff) | |
parent | e2d6f416d5f5cad2fd53cb16b542aee4ba970727 (diff) | |
download | nixpkgs-a0bbd640b8b637e29b04cef0f1ea60f1650e1e75.tar nixpkgs-a0bbd640b8b637e29b04cef0f1ea60f1650e1e75.tar.gz nixpkgs-a0bbd640b8b637e29b04cef0f1ea60f1650e1e75.tar.bz2 nixpkgs-a0bbd640b8b637e29b04cef0f1ea60f1650e1e75.tar.lz nixpkgs-a0bbd640b8b637e29b04cef0f1ea60f1650e1e75.tar.xz nixpkgs-a0bbd640b8b637e29b04cef0f1ea60f1650e1e75.tar.zst nixpkgs-a0bbd640b8b637e29b04cef0f1ea60f1650e1e75.zip |
Merge pull request #164119 from lukegb/mercurial
mercurial: add patch to fix the libc buffer type for aarch64-linux
Diffstat (limited to 'pkgs/applications')
-rw-r--r-- | pkgs/applications/version-management/mercurial/default.nix | 5 | ||||
-rw-r--r-- | pkgs/applications/version-management/mercurial/fix-rhg-type-aarch64.patch | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/pkgs/applications/version-management/mercurial/default.nix b/pkgs/applications/version-management/mercurial/default.nix index 0fb1cdddfba..9dc3e0329e3 100644 --- a/pkgs/applications/version-management/mercurial/default.nix +++ b/pkgs/applications/version-management/mercurial/default.nix @@ -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 diff --git a/pkgs/applications/version-management/mercurial/fix-rhg-type-aarch64.patch b/pkgs/applications/version-management/mercurial/fix-rhg-type-aarch64.patch new file mode 100644 index 00000000000..84417b497c0 --- /dev/null +++ b/pkgs/applications/version-management/mercurial/fix-rhg-type-aarch64.patch @@ -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 { |