diff --git a/cgo/sha1_nix.go b/cgo/sha1_nix.go index 144e48b..b775a18 100644 --- a/cgo/sha1_nix.go +++ b/cgo/sha1_nix.go @@ -16,7 +16,7 @@ func (d *digest) Write(p []byte) (nn int, err error) { } data := (*C.char)(unsafe.Pointer(&p[0])) - C.SHA1DCUpdate(&d.ctx, data, (C.ulong)(len(p))) + C.SHA1DCUpdate(&d.ctx, data, (C.size_t)(len(p))) return len(p), nil } diff --git a/cgo/sha1_nix_armhf.go b/cgo/sha1_nix_armhf.go index 10aa8ca..5b7a725 100644 --- a/cgo/sha1_nix_armhf.go +++ b/cgo/sha1_nix_armhf.go @@ -16,7 +16,7 @@ func (d *digest) Write(p []byte) (nn int, err error) { } data := (*C.char)(unsafe.Pointer(&p[0])) - C.SHA1DCUpdate(&d.ctx, data, (C.uint)(len(p))) + C.SHA1DCUpdate(&d.ctx, data, (C.size_t)(len(p))) return len(p), nil } diff --git a/cgo/sha1_windows.go b/cgo/sha1_windows.go index 3743b96..c179985 100644 --- a/cgo/sha1_windows.go +++ b/cgo/sha1_windows.go @@ -16,7 +16,7 @@ func (d *digest) Write(p []byte) (nn int, err error) { } data := (*C.char)(unsafe.Pointer(&p[0])) - C.SHA1DCUpdate(&d.ctx, data, (C.ulonglong)(len(p))) + C.SHA1DCUpdate(&d.ctx, data, (C.size_t)(len(p))) return len(p), nil }