syscalls: 'define-c-struct' properly align reads.
authorLudovic Courtès <ludo@gnu.org>
Sat, 25 Jul 2015 10:41:08 +0000 (12:41 +0200)
committerLudovic Courtès <ludo@gnu.org>
Sat, 25 Jul 2015 12:43:45 +0000 (14:43 +0200)
commit573b4c1ff3409fb4417ec676091f6bbc09219f19
treeeb4d7adfc12ff49c968e9c86fbfb10224cd8ecc3
parent3ca337699a2feb2a42f3661b7321a5e7d5fec594
syscalls: 'define-c-struct' properly align reads.

* guix/build/syscalls.scm (alignof*, align): New macros.
  (write-types, read-types): Use 'align' to compute the actual offset to
  read/write a value of TYPE0.
guix/build/syscalls.scm