guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/05: syscalls: Report lack of a libc symbol as ENOSYS.


From: Ludovic Courtès
Subject: 01/05: syscalls: Report lack of a libc symbol as ENOSYS.
Date: Mon, 10 Sep 2018 11:47:59 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit f8121329b1dcebb55d6dfbae553bfa69d557eede
Author: Ludovic Courtès <address@hidden>
Date:   Mon Sep 10 14:45:19 2018 +0200

    syscalls: Report lack of a libc symbol as ENOSYS.
    
    * guix/build/syscalls.scm (syscall->procedure): Throw to 'system-error
    with ENOSYS when NAME cannot be found.
---
 guix/build/syscalls.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm
index 74cb675..56a689f 100644
--- a/guix/build/syscalls.scm
+++ b/guix/build/syscalls.scm
@@ -385,8 +385,8 @@ the returned procedure is called."
                             #:return-errno? #t)))
     (lambda args
       (lambda _
-        (error (format #f "~a: syscall->procedure failed: ~s"
-                       name args))))))
+        (throw 'system-error name  "~A" (list (strerror ENOSYS))
+               (list ENOSYS))))))
 
 (define-syntax define-as-needed
   (syntax-rules ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]