-;;; FIXME: This is embarassing -- SBCL violates SBCL style-package locks
-;;; on the host lisp. Rather then find and fix all cases right now,
-;;; let's just remain self-hosting. The problems at least involve
-;;; a few defvars and local macros with names in the CL package.
-#+(and sbcl sb-package-locks)
-(dolist (p (list-all-packages))
- (sb-ext:unlock-package p))
+;;; FIXME: This is embarassing -- SBCL violates SBCL style-package
+;;; locks on the host lisp. Rather then find and fix all the cases
+;;; right now, let's just remain self-hosting. The problems at least
+;;; involve a few defvars and local macros with names in the CL
+;;; package.
+#+sbcl
+(let ((plp (find-symbol PACKAGE-LOCKED-P :sb-ext)))
+ (when (and plp (fboundp plp))
+ (dolist (p (list-all-packages))
+ (sb-ext::unlock-package p))))