0.6.12.5:
[sbcl.git] / tests / foreign.test.sh
index cdab547..3fa04e8 100644 (file)
@@ -20,9 +20,10 @@ make $testfilestem.o
 ld -shared -o $testfilestem.so $testfilestem.o
 
 ${SBCL:-sbcl} <<EOF
-  (load-foreign '("$testfilestem.so"))
-  (def-alien-routine summish int (x int) (y int))
-  (assert (= (summish 10 20) 31))
+  (when (fboundp 'load-foreign) ; not necessarily supported on all OSes..
+    (load-foreign '("$testfilestem.so"))
+    (def-alien-routine summish int (x int) (y int))
+    (assert (= (summish 10 20) 31)))
   (sb-ext:quit :unix-status 52) ; success convention for Lisp program
 EOF
 if [ $? != 52 ]; then