From 65dd06b7acff7ad14ec40c8616597426c49bc48d Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 17 Oct 2026 12:53:14 -1000 Subject: Hold object sizes in size_t as git 2.55 does Git 2.55 moved object sizes from unsigned long to size_t. The two are the same type on 64-bit hosts, but not on a 32-bit one, where GCC 14 rejects the mismatched pointers, so cgit stopped compiling there. --- source/shared.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/shared.h') diff --git a/source/shared.h b/source/shared.h index df18772..10aa659 100644 --- a/source/shared.h +++ b/source/shared.h @@ -62,7 +62,7 @@ extern void cgit_diff_tree_cb(struct diff_queue_struct *q, struct diff_options * * in place of the content. */ extern int cgit_diff_files(const struct object_id *old_oid, const struct object_id *new_oid, - unsigned long *old_size, unsigned long *new_size, int *binary, int context, int ignorews, + size_t *old_size, size_t *new_size, int *binary, int context, int ignorews, linediff_fn fn); /* @@ -70,7 +70,7 @@ extern int cgit_diff_files(const struct object_id *old_oid, const struct object_ * reading the object, so a huge blob stays out of memory rather than being * noticed once it is already there. */ -extern int cgit_blob_too_large(unsigned long size); +extern int cgit_blob_too_large(size_t size); /* * Limit a diff to the paths below prefix, which is taken literally. -- cgit