Manolis Ragkousis writes: > From c2800b786f62c190b35e306e59af7a73a19094e0 Mon Sep 17 00:00:00 2001 > From: Manolis Ragkousis > Date: Fri, 21 Aug 2015 22:00:16 +0300 > Subject: [PATCH] syscalls: Turn syscalls wrappers into procedures. > > * guix/build/syscalls.scm (mount, umount, swapon, swapoff, > setns, pivot-root, clone): Turn into procedures. This commit would change the API of (guix build syscalls), without updating any of the code that uses that API. This would break everything that uses this API. Anyway, the bindings you changed are already procedures. You could accomplish the same thing you're doing now without changing the API, by simply moving the 'lambda*' outside of the 'let*', like this: --8<---------------cut here---------------start------------->8--- (define mount (lambda* (source target type #:optional (flags 0) options #:key (update-mtab? #f)) "Mount device SOURCE on TARGET as a file system TYPE. Optionally, FLAGS may be a bitwise-or of the MS_* constants, and OPTIONS may be a string. When FLAGS contains MS_REMOUNT, SOURCE and TYPE are ignored. When UPDATE-MTAB? is true, update /etc/mtab. Raise a 'system-error' exception on error." (let* ((ptr (dynamic-func "mount" (dynamic-link))) (proc (pointer->procedure int ptr `(* * * ,unsigned-long *)))) (let ((ret (proc (if source (string->pointer source) %null-pointer) [...] --8<---------------cut here---------------end--------------->8--- However, this approach will be quite inefficient, whether done as shown above or using your patch, because the FFI wrappers will be newly created each time these procedures are called, and then thrown away. Instead, I would prefer to gracefully handle the case where these syscalls are not available. In that case, we can bind the variable to a procedure that reports the error when it's called. I've attached an (untested) patch that does this. Can you see if it works for you? Thanks! Mark