From bc660a41bc7abe68ff8fcd76682063d0d458a54e Mon Sep 17 00:00:00 2001
From: Francois-Rene Rideau <tunes@google.com>
Date: Wed, 5 Mar 2014 14:49:51 -0500
Subject: [PATCH] chdir on SBCL: require sb-posix before using it.
 ensure-function: a hash-table can be seen as a function (to be used by ASDF).

---
 uiop/os.lisp      | 2 +-
 uiop/utility.lisp | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/uiop/os.lisp b/uiop/os.lisp
index 0de9bd34..6d7afebe 100644
--- a/uiop/os.lisp
+++ b/uiop/os.lisp
@@ -278,7 +278,7 @@ suitable for use as a directory name to segregate Lisp FASLs, C dynamic librarie
           #+genera (setf *default-pathname-defaults* x)
           #+lispworks (hcl:change-directory x)
           #+mkcl (mk-ext:chdir x)
-          #+sbcl (symbol-call :sb-posix :chdir (sb-ext:native-namestring x))
+          #+sbcl (progn (require :sb-posix) (symbol-call :sb-posix :chdir (sb-ext:native-namestring x)))
           (error "chdir not supported on your implementation")))))
 
 
diff --git a/uiop/utility.lisp b/uiop/utility.lisp
index a9c42272..230c0c76 100644
--- a/uiop/utility.lisp
+++ b/uiop/utility.lisp
@@ -380,6 +380,7 @@ and EVAL that in a (FUNCTION ...) context."
     (etypecase fun
       (function fun)
       ((or boolean keyword character number pathname) (constantly fun))
+      (hash-table (lambda (x) (gethash x fun)))
       (symbol (fdefinition fun))
       (cons (if (eq 'lambda (car fun))
                 (eval fun)
-- 
GitLab