syscalls: Adjust for lack of 'libutil.so' on glibc >= 2.34.
This is a re-implementation of3c8b6fd94c
done in a way that works for both glibc >= 2.34 and earlier versions. * guix/build/syscalls.scm (syscall->procedure): When LIBRARY is true, fall back to global symbols if (dynamic-link library) fails. (cherry picked from commit3f6c32a88f
)
This commit is contained in:
parent
883fefe160
commit
047425a662
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user