Skip to content

Commit

Permalink
Testing a change in the way we load CL+SSL.
Browse files Browse the repository at this point in the history
Apparently cl+ssl needs to be reloaded a very specific way at image startup
time, and provides a function to do just that. Let's try and use this piece
of magic rather cffi:load-foreign-library directly.
  • Loading branch information
dimitri committed Apr 16, 2018
1 parent cb9e01f commit 01f877b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/hooks.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,18 @@
(defun close-foreign-libs ()
"Close Foreign libs in use by pgloader at application save time."
(let (#+sbcl (sb-ext:*muffled-warnings* 'style-warning))
(mapc #'cffi:close-foreign-library '(;; cl+ssl::libssl
(mapc #'cffi:close-foreign-library '(cl+ssl::libssl
mssql::sybdb))))

(defun open-foreign-libs ()
"Open Foreign libs in use by pgloader at application start time."
(let (#+sbcl (sb-ext:*muffled-warnings* 'style-warning))
;; we specifically don't load mssql::sybdb eagerly, it's getting loaded
;; in only when the data source is a MS SQL database.
(cffi:load-foreign-library 'cl+ssl::libssl)))
;;
;; and for CL+SSL, we need to call the specific reload function that
;; handles some context and things around loading with CFFI.
(cl+ssl:reload)))

#|
#+ccl (push #'open-foreign-libs *lisp-startup-functions*)
Expand Down

0 comments on commit 01f877b

Please sign in to comment.