X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fload.lisp;h=ede4e2d7a663d0789c53ba830dc78d367cad232f;hb=1e5296127f5b384a2171646747021ebeee73b801;hp=941891be11dee39cb9af5dca8cbba5d280b62ad1;hpb=e2574c9090a19634f1f903a9f0c229960edfd7b6;p=sbcl.git diff --git a/src/code/load.lisp b/src/code/load.lisp index 941891b..ede4e2d 100644 --- a/src/code/load.lisp +++ b/src/code/load.lisp @@ -315,7 +315,14 @@ ;;; Returns T if the stream is a binary input stream with a FASL header. (defun fasl-header-p (stream &key errorp) - (unless (member (stream-element-type stream) '(character base-char)) + (unless (and (member (stream-element-type stream) '(character base-char)) + ;; give up if it's not a file stream, or it's an + ;; fd-stream but it's either not bivalent or not + ;; seekable (doesn't really have a file) + (or (not (typep stream 'file-stream)) + (and (typep stream 'fd-stream) + (or (not (sb!impl::fd-stream-bivalent-p stream)) + (not (sb!impl::fd-stream-file stream)))))) (let ((p (file-position stream))) (unwind-protect (let* ((header *fasl-header-string-start-string*)