]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: fix build on dragonfly
authorMikio Hara <mikioh.mikioh@gmail.com>
Wed, 21 Sep 2016 03:53:25 +0000 (12:53 +0900)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 21 Sep 2016 05:23:57 +0000 (05:23 +0000)
This change fixes the broken build caused by CL 23780.

Change-Id: I142cf8a1af033d036d57ac56e9e21ea925d922d4
Reviewed-on: https://go-review.googlesource.com/29490
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/syscall/syscall_dragonfly.go

index 97a8ef893298c91588a797676827c276abeca348..980687ccbd11a1eec3adec5b9787f612b39734b0 100644 (file)
@@ -57,7 +57,7 @@ func nametomib(name string) (mib []_C_int, err error) {
 }
 
 func direntIno(buf []byte) (uint64, bool) {
-       return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
+       return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
 }
 
 func direntReclen(buf []byte) (uint64, bool) {
@@ -65,7 +65,7 @@ func direntReclen(buf []byte) (uint64, bool) {
        if !ok {
                return 0, false
        }
-       return (16 + namlen + 1 + 7) & ^7, true
+       return (16 + namlen + 1 + 7) & ^uint64(7), true
 }
 
 func direntNamlen(buf []byte) (uint64, bool) {