From a1f3bf3c98d21b09a75f57682cdb12a6e48ebb08 Mon Sep 17 00:00:00 2001
From: Julianiolo <50519317+Julianiolo@users.noreply.github.com>
Date: Fri, 13 Sep 2024 21:31:02 +0200
Subject: [PATCH] replace ssize_t with gint64

---
 libvips/iofuncs/generate.c | 2 +-
 libvips/iofuncs/util.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libvips/iofuncs/generate.c b/libvips/iofuncs/generate.c
index bb3d1b2d7..8941762f7 100644
--- a/libvips/iofuncs/generate.c
+++ b/libvips/iofuncs/generate.c
@@ -638,7 +638,7 @@ write_vips(VipsRegion *region, VipsRect *area, void *a)
 		// write() uses int not size_t on windows, so we need to chunk
 		// ... max 1gb, why not
 		int chunk_size = VIPS_MIN(1024 * 1024 * 1024, count);
-		ssize_t nwritten = write(region->im->fd, buf, chunk_size);
+		gint64 nwritten = write(region->im->fd, buf, chunk_size);
 
 		/* n == 0 isn't strictly an error, but we treat it as
 		 * one to make sure we don't get stuck in this loop.
diff --git a/libvips/iofuncs/util.c b/libvips/iofuncs/util.c
index 46976ef42..acf78ade8 100644
--- a/libvips/iofuncs/util.c
+++ b/libvips/iofuncs/util.c
@@ -468,7 +468,7 @@ vips__write(int fd, const void *buf, size_t count)
 		// write() uses int not size_t on windows, so we need to chunk
 		// ... max 1gb, why not
 		int chunk_size = VIPS_MIN(1024 * 1024 * 1024, count);
-		ssize_t nwritten = write(fd, buf, chunk_size);
+		gint64 nwritten = write(fd, buf, chunk_size);
 
 		/* n == 0 isn't strictly an error, but we treat it as
 		 * one to make sure we don't get stuck in this loop.
 
