Changes from v3 version of patch (suggestions from agraf on irc): * Fix checkpatch.pl issues. * Use ARRAY_SIZE instead of custom macro. * Pass 0 as last arg to unlock_user_struct() in host_to_target_itimerspec.
Changes from original patch: * Call host's libc functions directly rather than _syscall*() (as suggested by Peter Maydell). * Remove un-needed #defines.