On Fri, Feb 8, 2013 at 6:10 PM, Uros Bizjak <ubiz...@gmail.com> wrote: > On Fri, Feb 8, 2013 at 5:53 PM, Ian Lance Taylor <i...@google.com> wrote: >> On Fri, Feb 8, 2013 at 8:48 AM, Uros Bizjak <ubiz...@gmail.com> wrote: >>> >>> utimensat returns zero on CentOS. Following is gdb session: >> >> Thanks--can you do the same session but with "step" instead of "next"? > > I think I got the problem.
Yep. Following patch fixes the failure: --cut here-- Index: go/syscall/libcall_linux_utimesnano.go =================================================================== --- go/syscall/libcall_linux_utimesnano.go (revision 195879) +++ go/syscall/libcall_linux_utimesnano.go (working copy) @@ -9,7 +9,7 @@ import "unsafe" //sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) -//utimensat(dirfd int, path *byte, times *[2]Timespec, flags int) int +//utimensat(dirfd _C_int, path *byte, times *[2]Timespec, flags int) _C_int func UtimesNano(path string, ts []Timespec) (err error) { if len(ts) != 2 { return EINVAL --cut here-- Please note, that looking at generated libcalls.go, there are many other possible signed/unsigned issues of the same type. Since this all happens on x86_64 (where go int is apparently 64bit), it looks that it is very important to distinguish int from _C_int in glue source. Uros.