diff --git a/src/aclocal.m4 b/src/aclocal.m4
index e1496d6..6248064 100644
--- a/src/aclocal.m4
+++ b/src/aclocal.m4
@@ -981,13 +981,11 @@ if test "${enable_libffi}" = auto -o "${enable_libffi}" = system; then
  dnl
  dnl Try first with the prebuilt versions, if installed and accessible
  dnl
- AC_CHECK_LIB( ffi, ffi_call, [system_libffi=yes], [system_libffi=no] )
- if test "${system_libffi}" = yes; then
-   AC_CHECK_HEADER([ffi/ffi.h],[ECL_LIBFFI_HEADER='ffi/ffi.h'],[system_libffi=no],[])
-   if test -z "$ECL_LIBFFI_HEADER"; then
-     AC_CHECK_HEADER([ffi.h],[ECL_LIBFFI_HEADER='ffi.h'],[system_libffi=no],[])
-   fi
- fi
+ AC_CHECK_LIB(ffi, ffi_call,
+  [AC_CHECK_HEADERS([ffi/ffi.h ffi.h],
+    [ECL_LIBFFI_HEADER=$ac_header; system_libffi=yes; break],
+    [system_libffi=no],[])],
+  [system_libffi=no])
  AC_MSG_CHECKING( [whether we can use the existing libffi library] )
  AC_MSG_RESULT( [${system_libffi}] )
  if test "${system_libffi}" = "no"; then
diff --git a/src/c/threads/process.d b/src/c/threads/process.d
index 06ad952..f15226c 100644
--- a/src/c/threads/process.d
+++ b/src/c/threads/process.d
@@ -578,8 +578,8 @@ mp_block_signals(void)
 {
 #ifdef ECL_WINDOWS_THREADS
         cl_env_ptr the_env = ecl_process_env();
-        cl_object previous = ecl_symbol_value(@'si::*interrupts-enabled*');
-        ECL_SETQ(the_env, @'si::*interrupts-enabled*', Cnil);
+        cl_object previous = ecl_symbol_value(@'ext::*interrupts-enabled*');
+        ECL_SETQ(the_env, @'ext::*interrupts-enabled*', Cnil);
         @(return previous)
 #else
         cl_object previous = mp_get_sigmask();
@@ -596,7 +596,7 @@ mp_restore_signals(cl_object sigmask)
 {
 #ifdef ECL_WINDOWS_THREADS
         cl_env_ptr the_env = ecl_process_env();
-        ECL_SETQ(the_env, @'si::*interrupts-enabled*', sigmask);
+        ECL_SETQ(the_env, @'ext::*interrupts-enabled*', sigmask);
         ecl_check_pending_interrupts();
         @(return sigmask)
 #else
diff --git a/src/c/unixint.d b/src/c/unixint.d
index 9810edd..0fd86ce 100644
--- a/src/c/unixint.d
+++ b/src/c/unixint.d
@@ -247,7 +247,7 @@ static bool
 interrupts_disabled_by_lisp(cl_env_ptr the_env)
 {
 	return (ecl_get_option(ECL_OPT_BOOTED) &&
-		ecl_symbol_value(@'si::*interrupts-enabled*') == Cnil);
+		ecl_symbol_value(@'ext::*interrupts-enabled*') == Cnil);
 }
 
 static cl_object pop_signal(cl_env_ptr env);
@@ -1193,7 +1193,7 @@ init_unixint(int pass)
 		create_signal_code_constants();
 		install_fpe_signal_handlers();
 		install_signal_handling_thread();
-		ECL_SET(@'si::*interrupts-enabled*', Ct);
+		ECL_SET(@'ext::*interrupts-enabled*', Ct);
 		ecl_process_env()->disable_interrupts = 0;
 	}
 }
diff --git a/src/c/unixsys.d b/src/c/unixsys.d
index 8af6b61..11e5563 100755
--- a/src/c/unixsys.d
+++ b/src/c/unixsys.d
@@ -27,6 +27,8 @@
 #include <ecl/internal.h>
 #if defined(ECL_MS_WINDOWS_HOST)
 # include <windows.h>
+#else
+# include <errno.h>
 #endif
 #ifdef HAVE_SYS_WAIT_H
 # include <sys/wait.h>
diff --git a/src/lsp/mp.lsp b/src/lsp/mp.lsp
index e3dde98..480372d 100644
--- a/src/lsp/mp.lsp
+++ b/src/lsp/mp.lsp
@@ -65,22 +65,22 @@ WITHOUT-INTERRUPTS in:
                       `(let ((si:*allow-with-interrupts* ,',outer-allow-with-interrupts))
                          ,@allow-forms))
                     (with-restored-interrupts (&body with-forms)
-                      `(let ((si:*interrupts-enabled* ,',outer-interrupts-enabled))
+                      `(let ((ext:*interrupts-enabled* ,',outer-interrupts-enabled))
                          ,@with-forms))
                     (with-local-interrupts (&body with-forms)
                       `(let* ((si:*allow-with-interrupts* ,',outer-allow-with-interrupts)
-                              (si:*interrupts-enabled* ,',outer-allow-with-interrupts))
+                              (ext:*interrupts-enabled* ,',outer-allow-with-interrupts))
                          (when ,',outer-allow-with-interrupts
                            (si::check-pending-interrupts))
                          (locally ,@with-forms))))
-           (let* ((,outer-interrupts-enabled si:*interrupts-enabled*)
-                  (si:*interrupts-enabled* nil)
+           (let* ((,outer-interrupts-enabled ext:*interrupts-enabled*)
+                  (ext:*interrupts-enabled* nil)
                   (,outer-allow-with-interrupts si:*allow-with-interrupts*)
                   (si:*allow-with-interrupts* nil))
              (declare (ignorable ,outer-allow-with-interrupts
                                  ,outer-interrupts-enabled))
              ,@body))
-       (when si:*interrupts-enabled*
+       (when ext:*interrupts-enabled*
          (si::check-pending-interrupts)))))
 
 (defmacro with-interrupts (&body body)
@@ -97,8 +97,8 @@ by ALLOW-WITH-INTERRUPTS."
     ;; and *INTERRUPTS-ENABLED* T -- instead of risking future breakage
     ;; we take the tiny hit here.
     `(let* ((,allowp si:*allow-with-interrupts*)
-            (,enablep si:*interrupts-enabled*)
-            (si:*interrupts-enabled* (or ,enablep ,allowp)))
+            (,enablep ext:*interrupts-enabled*)
+            (ext:*interrupts-enabled* (or ,enablep ,allowp)))
        (when (and ,allowp (not ,enablep))
          (si::check-pending-interrupts))
        (locally ,@body))))
