summaryrefslogtreecommitdiff
path: root/guix/build
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-12-05 15:51:04 +0100
committerLudovic Courtès <ludo@gnu.org>2022-12-05 15:51:04 +0100
commit7fde16671523f3fc3bda0c07a47a1fa33f8675b1 (patch)
treeeb4de00690836b426870ddf162d8ddd16502cb81 /guix/build
parentbcbf9713dae06e01d97ff61bc87a9f4d91571bac (diff)
parent241772d5c068fb7c4fa69d4673174254742eb410 (diff)
Merge branch 'version-1.4.0'
Diffstat (limited to 'guix/build')
-rw-r--r--guix/build/syscalls.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm
index 2a12567b15..0358960ff5 100644
--- a/guix/build/syscalls.scm
+++ b/guix/build/syscalls.scm
@@ -447,9 +447,14 @@ If an error occurs while creating the binding, defer the error report until
the returned procedure is called."
(catch #t
(lambda ()
+ ;; Note: When #:library is set, try it first and fall back to libc
+ ;; proper. This is because libraries like libutil.so have been subsumed
+ ;; by libc.so with glibc >= 2.34.
(let ((ptr (dynamic-func name
(if library
- (dynamic-link library)
+ (or (false-if-exception
+ (dynamic-link library))
+ (dynamic-link))
(dynamic-link)))))
;; The #:return-errno? facility was introduced in Guile 2.0.12.
(pointer->procedure return-type ptr argument-types