go/mio: fix build regression
At commit
$ go build
# motr/mio
../mio/mio.go:297:5: cannot use lid (type _Ctype_long) as type
_Ctype_ulong in return argument
Solution: update getOptimalUnitSz() and typecase the return
value of m0_layout_find_by_buffsize() to C.ulong.
@@ -296,7 +296,7 @@ func getOptimalUnitSz(sz uint64, pool *C.struct_m0_fid) (C.ulong, error) {
if lid <= 0 {
return 0, fmt.Errorf("could not find layout: rc=%v", lid)
}
- return lid, nil
+ return C.ulong(lid), nil
}
func checkPool(pools []string) (res *C.struct_m0_fid, err error) {
