mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
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
1 changed files with 6 additions and 1 deletions
|
@ -447,9 +447,14 @@ (define* (syscall->procedure return-type name argument-types
|
|||
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 a new issue