diff options
| author | AwesomeAdam54321 <adam.faiz@disroot.org> | 2025-11-02 20:16:07 +0800 |
|---|---|---|
| committer | Sughosha <sughosha@disroot.org> | 2025-11-09 13:02:30 +0530 |
| commit | 0a6dbaeb668db011fa470cc6bd3a8bc9539b515d (patch) | |
| tree | ca2c81f1828e8589eae373e6207fade7ea06e87b /gnu/packages | |
| parent | 06ab49a653361f59dccea6c62da51117a0266979 (diff) | |
gnu: perl-crypt-des: Fix build.
* gnu/packages/patches/perl-crypt-des-implicit-func-decl.patch: New file.
* gnu/local.mk: Register patch.
* gnu/packages/games.scm (perl-crypt-des)[patches]: Add patch.
Change-Id: Ia9d55640f7ffcc5cc24cff34c246c1e6b870cec7
Signed-off-by: Sughosha <sughosha@disroot.org>
Diffstat (limited to 'gnu/packages')
| -rw-r--r-- | gnu/packages/patches/perl-crypt-des-implicit-func-decl.patch | 34 | ||||
| -rw-r--r-- | gnu/packages/perl.scm | 3 |
2 files changed, 36 insertions, 1 deletions
diff --git a/gnu/packages/patches/perl-crypt-des-implicit-func-decl.patch b/gnu/packages/patches/perl-crypt-des-implicit-func-decl.patch new file mode 100644 index 00000000000..fa65def771b --- /dev/null +++ b/gnu/packages/patches/perl-crypt-des-implicit-func-decl.patch @@ -0,0 +1,34 @@ +https://src.fedoraproject.org/rpms/perl-Crypt-DES/raw/0a4557f6b118387730b895037e4a17c90f212e68/f/perl-Crypt-DES-fedora-c99.patch +https://rt.cpan.org/Public/Bug/Display.html?id=133363 +https://rt.cpan.org/Public/Bug/Display.html?id=133412 +https://bugs.gentoo.org/870427 +--- a/DES.xs ++++ b/DES.xs +@@ -36,7 +36,7 @@ _des_expand_key(key) + if (key_len != sizeof(des_user_key)) + croak("Invalid key"); + +- perl_des_expand_key((i8 *)key, ks); ++ perl_des_expand_key((unsigned char *)key, ks); + + ST(0) = sv_2mortal(newSVpv((char *)ks, sizeof(ks))); + } +@@ -66,7 +66,8 @@ _des_crypt(input, output, ks, enc_flag) + + (SvUPGRADE(output, SVt_PV)); + +- perl_des_crypt(input, SvGROW(output, output_len), (i32 *)ks, enc_flag); ++ perl_des_crypt((unsigned char *)input, (unsigned char *)SvGROW(output, output_len), ++ (unsigned long *)ks, enc_flag); + + SvCUR_set(output, output_len); + *SvEND(output) = '\0'; +--- a/_des.h ++++ b/_des.h +@@ -5,3 +5,5 @@ typedef unsigned long des_ks[32]; + void _des_crypt( des_cblock in, des_cblock out, des_ks key, int encrypt ); + void _des_expand_key( des_user_key userKey, des_ks key ); + ++void perl_des_expand_key(des_user_key userKey, des_ks ks); ++void perl_des_crypt( des_cblock input, des_cblock output, des_ks ks, int encrypt ); + diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index c959541597d..3ba41759094 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -2567,7 +2567,8 @@ are compatible with the encryption format used by SSLeay.") version ".tar.gz")) (sha256 (base32 - "1rypxlhpd1jc0c327aghgl9y6ls47drmpvn0a40b4k3vhfsypc9d")))) + "1rypxlhpd1jc0c327aghgl9y6ls47drmpvn0a40b4k3vhfsypc9d")) + (patches (search-patches "perl-crypt-des-implicit-func-decl.patch")))) (build-system perl-build-system) (native-inputs (list perl-crypt-cbc)) |
