about summary refs log tree commit diff
path: root/pkgs/development/interpreters/clisp
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2017-11-08 15:21:09 +0100
committeraszlig <aszlig@nix.build>2017-11-08 15:52:25 +0100
commit845aae9c1028a4e95a0ea300bda961056072b8d8 (patch)
treec702ba931c712285d09c30fbbf01c55a6eaccee7 /pkgs/development/interpreters/clisp
parentb11ac5d29dcccdb7474a23ac1d8a6c40553adcd5 (diff)
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
Diffstat (limited to 'pkgs/development/interpreters/clisp')
-rw-r--r--pkgs/development/interpreters/clisp/default.nix6
-rw-r--r--pkgs/development/interpreters/clisp/remove-cfree-binding.patch12
2 files changed, 17 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/clisp/default.nix b/pkgs/development/interpreters/clisp/default.nix
index 2386cc2715503..9ab43e7392d77 100644
--- a/pkgs/development/interpreters/clisp/default.nix
+++ b/pkgs/development/interpreters/clisp/default.nix
@@ -48,7 +48,11 @@ stdenv.mkDerivation rec {
     libX11 libXau libXt libXpm xproto libXext xextproto
   ];
 
-  patches = [ ./bits_ipctypes_to_sys_ipc.patch ]; # from Gentoo
+  patches = [
+    ./bits_ipctypes_to_sys_ipc.patch # from Gentoo
+    # The cfree alias no longer exists since glibc 2.26
+    ./remove-cfree-binding.patch
+  ];
 
   # First, replace port 9090 (rather low, can be used)
   # with 64237 (much higher, IANA private area, not
diff --git a/pkgs/development/interpreters/clisp/remove-cfree-binding.patch b/pkgs/development/interpreters/clisp/remove-cfree-binding.patch
new file mode 100644
index 0000000000000..4b570c3a46724
--- /dev/null
+++ b/pkgs/development/interpreters/clisp/remove-cfree-binding.patch
@@ -0,0 +1,12 @@
+diff --git a/modules/bindings/glibc/linux.lisp b/modules/bindings/glibc/linux.lisp
+index c40b4f8..1c8edca 100644
+--- a/modules/bindings/glibc/linux.lisp
++++ b/modules/bindings/glibc/linux.lisp
+@@ -648,7 +648,6 @@
+ (def-call-out calloc (:arguments (nmemb size_t) (size size_t))
+   (:return-type c-pointer))
+ (def-call-out free (:arguments (ptr c-pointer)) (:return-type nil))
+-(def-call-out cfree (:arguments (ptr c-pointer)) (:return-type nil))
+ (def-call-out valloc (:arguments (size size_t)) (:return-type c-pointer))
+ 
+ (def-call-out abort (:arguments) (:return-type nil))