diff --git a/csum-file.c b/csum-file.c
index 59ef3398ca..46f753d012 100644
--- a/csum-file.c
+++ b/csum-file.c
@@ -92,7 +92,8 @@ int finalize_hashfile(struct hashfile *f, unsigned char *result,
return fd;
}
-void hashwrite(struct hashfile *f, const void *buf, unsigned int count)
+void real_hashwrite(struct hashfile *f, const void *buf, unsigned int count);
+void real_hashwrite(struct hashfile *f, const void *buf, unsigned int count)
{
while (count) {
unsigned left = f->buffer_len - f->offset;