Skip to content

Commit 6ffc49e

Browse files
authored
Merge pull request libgit2#5136 from libgit2/ethomson/largefiles_32bit
largefile tests: only write 2GB on 32-bit platforms
2 parents 4df9f3c + 8eb910b commit 6ffc49e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/object/tree/read.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ void test_object_tree_read__two(void)
7575
}
7676

7777
#define BIGFILE "bigfile"
78-
#define BIGFILE_SIZE (off_t)4 * 1024 * 1024 * 1024 /* 4 GiB */
78+
#ifdef GIT_ARCH_64
79+
# define BIGFILE_SIZE (size_t)4 * 1024 * 1024 * 1024 /* 4 GiB */
80+
#else
81+
# define BIGFILE_SIZE SIZE_MAX
82+
#endif
7983

8084
void test_object_tree_read__largefile(void)
8185
{

0 commit comments

Comments
 (0)