Skip to content

Commit

Permalink
clisp: Add patch to remove reference to cfree
Browse files Browse the repository at this point in the history
Fixes the build failure after the upgrade to glibc 2.26 in
9bb67d5.

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
  • Loading branch information
aszlig committed Nov 8, 2017
1 parent b11ac5d commit 845aae9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkgs/development/interpreters/clisp/default.nix
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions 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))

0 comments on commit 845aae9

Please sign in to comment.