avoid trying to load Foundation framework on non-Mac OS

Relevant to #1549
This commit is contained in:
Matthew Flatt 2017-01-03 12:47:58 -07:00
parent 88b2d5d4e6
commit 78bbcec963

View File

@ -7,8 +7,9 @@
call-with-autorelease))
;; Make sure Foundation is loaded:
(void (ffi-lib "/System/Library/Frameworks/Foundation.framework/Foundation"
#:fail (lambda () #f)))
(when (eq? 'macosx (system-type))
(void (ffi-lib "/System/Library/Frameworks/Foundation.framework/Foundation"
#:fail (lambda () #f))))
(import-class NSAutoreleasePool)