diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-07-25 11:50:23 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-07-25 14:43:44 +0200 |
commit | 4a30e84e6182686fde93504e07616fe8e70d94d5 (patch) | |
tree | f2f994ab7cc80d70e931295053f808f4fee2cbf7 /guix | |
parent | b89e74054ee54b3afc8aed99fe9be89e8e05890b (diff) | |
download | gnu-guix-4a30e84e6182686fde93504e07616fe8e70d94d5.tar gnu-guix-4a30e84e6182686fde93504e07616fe8e70d94d5.tar.gz |
syscalls: 'define-c-struct' distinguishes pointers from integers.
* guix/build/syscalls.scm (read-type): Add special-case for when TYPE is '*.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/build/syscalls.scm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index ae5b2ed112..73c54372e1 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -388,7 +388,11 @@ system to PUT-OLD." (types ...) (fields ...)))))) (define-syntax read-type - (syntax-rules (~) + (syntax-rules (~ quote *) + ((_ bv offset '*) + (make-pointer (bytevector-uint-ref bv offset + (native-endianness) + (sizeof* '*)))) ((_ bv offset (type ~ order)) (bytevector-uint-ref bv offset (endianness order) (sizeof* type))) |