diff options
author | Marius Bakke <mbakke@fastmail.com> | 2017-08-26 15:15:49 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2017-08-26 15:15:49 +0200 |
commit | 72e2815d18ad688b0a16ce3b3efba1172423cec4 (patch) | |
tree | b3d6aa01aec86a7f224e15d97a40b64de4e5cdb8 /guix/build/syscalls.scm | |
parent | c20cd0d24d9b5e8a47b864db9799e0992ffd44b9 (diff) | |
parent | 2f837cf7fe100b0584fb02cf8f19d4cfb4e14d88 (diff) |
Merge branch 'core-updates'
Diffstat (limited to 'guix/build/syscalls.scm')
-rw-r--r-- | guix/build/syscalls.scm | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index 33a23edaac..55b0df3911 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -726,15 +726,19 @@ mounted at FILE." (cond-expand (guile-2.2 (define %set-automatic-finalization-enabled?! - (let ((proc (pointer->procedure int - (dynamic-func - "scm_set_automatic_finalization_enabled" - (dynamic-link)) - (list int)))) + ;; When using a statically-linked Guile, for instance in the initrd, we + ;; cannot resolve this symbol, but most of the time we don't need it + ;; anyway. Thus, delay it. + (let ((proc (delay + (pointer->procedure int + (dynamic-func + "scm_set_automatic_finalization_enabled" + (dynamic-link)) + (list int))))) (lambda (enabled?) "Switch on or off automatic finalization in a separate thread. Turning finalization off shuts down the finalization thread as a side effect." - (->bool (proc (if enabled? 1 0)))))) + (->bool ((force proc) (if enabled? 1 0)))))) (define-syntax-rule (without-automatic-finalization exp) "Turn off automatic finalization within the dynamic extent of EXP." |