git.iko.soy/typeable/nixpkgs
on master help sign in
clisp: Add patch to remove reference to cfree

Fixes the build failure after the upgrade to glibc 2.26 in 9bb67d5c1e546968fa3d195f0bcad82414243566. From the cfree(3) manpage: This function should never be used. Use free(3) instead. Starting with version 2.26, it has been removed from glibc. From the glibc 2.26 release notes[1]: * The obsolete function cfree has been removed. Applications should use free instead. [1]: https://sourceware.org/ml/libc-alpha/2017-08/msg00010.html Signed-off-by: aszlig <aszlig@nix.build> Cc: @7c6f434c, @tohl

commit845aae9c1028a4e95a0ea300bda961056072b8d8 authoraszlig <aszlig@nix.build> dateWed 8 Nov 2017, 15:21 (9 years ago) parentb11ac5d
2 files changed+17−1
pkgs/development/interpreters/clisp/default.nix+5−1 pkgs/development/interpreters/clisp/remove-cfree-binding.patch+12
pkgs/development/interpreters/clisp/default.nix+5−1
@@ -48,7 +48,11 @@ stdenv.mkDerivation rec {
4848 libX11 libXau libXt libXpm xproto libXext xextproto
4949 ];
5050
51− patches = [ ./bits_ipctypes_to_sys_ipc.patch ]; # from Gentoo
51+ patches = [
52+ ./bits_ipctypes_to_sys_ipc.patch # from Gentoo
53+ # The cfree alias no longer exists since glibc 2.26
54+ ./remove-cfree-binding.patch
55+ ];
5256
5357 # First, replace port 9090 (rather low, can be used)
5458 # with 64237 (much higher, IANA private area, not
pkgs/development/interpreters/clisp/remove-cfree-binding.patchnew file+12
@@ -0,0 +1,12 @@
1+diff --git a/modules/bindings/glibc/linux.lisp b/modules/bindings/glibc/linux.lisp
2+index c40b4f8..1c8edca 100644
3+--- a/modules/bindings/glibc/linux.lisp
4++++ b/modules/bindings/glibc/linux.lisp
5+@@ -648,7 +648,6 @@
6+ (def-call-out calloc (:arguments (nmemb size_t) (size size_t))
7+ (:return-type c-pointer))
8+ (def-call-out free (:arguments (ptr c-pointer)) (:return-type nil))
9+-(def-call-out cfree (:arguments (ptr c-pointer)) (:return-type nil))
10+ (def-call-out valloc (:arguments (size size_t)) (:return-type c-pointer))
11+
12+ (def-call-out abort (:arguments) (:return-type nil))