diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
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.
Diffstat (limited to 'source/ui-blob.c')
-rw-r--r--source/ui-blob.c6
1 file changed, 3 insertions, 3 deletions
diff --git a/source/ui-blob.c b/source/ui-blob.c
index f7047c7..1d22483 100644
--- a/source/ui-blob.c
+++ b/source/ui-blob.c
@@ -98,7 +98,7 @@ static int find_path_oid(struct object_id *oid, char *path, int file_only)
int cgit_ref_path_exists(const char *path, const char *ref, int file_only)
{
struct object_id oid;
- unsigned long size;
+ size_t size;
char *path_copy = xstrdup(path);
int found = 0;
@@ -117,7 +117,7 @@ int cgit_print_file(char *path, const char *head, int file_only, int html_escape
{
struct object_id oid;
enum object_type type;
- unsigned long size;
+ size_t size;
char *buf;
if (repo_get_oid(the_repository, head, &oid))
@@ -165,7 +165,7 @@ void cgit_print_blob(const char *hex, char *path, const char *head, int file_onl
{
struct object_id oid;
enum object_type type;
- unsigned long size;
+ size_t size;
char *buf;
if (hex) {