$OpenBSD: patch-platform_x11_curl_stream_c,v 1.3 2021/11/13 17:23:38 sthen Exp $

Index: platform/x11/curl_stream.c
--- platform/x11/curl_stream.c.orig
+++ platform/x11/curl_stream.c
@@ -393,7 +393,7 @@ static int cs_next(fz_context *ctx, fz_stream *stream,
 	{
 		unlock(state);
 		if (state->data_arrived == 0)
-			fz_throw(ctx, err_type, "read of a block we don't have (A) (offset=%ld)", read_point);
+			fz_throw(ctx, err_type, "read of a block we don't have (A) (offset=%lld)", read_point);
 		return EOF;
 	}
 
@@ -407,7 +407,7 @@ static int cs_next(fz_context *ctx, fz_stream *stream,
 		if (read_point + len > state->current_fill_start)
 		{
 			unlock(state);
-			fz_throw(ctx, err_type, "read of a block we don't have (B) (offset=%ld)", read_point);
+			fz_throw(ctx, err_type, "read of a block we don't have (B) (offset=%lld)", read_point);
 		}
 		memcpy(buf, state->buffer + read_point, len);
 		unlock(state);
@@ -430,7 +430,7 @@ static int cs_next(fz_context *ctx, fz_stream *stream,
 		{
 			state->next_fill_start = block<<BLOCK_SHIFT;
 			unlock(state);
-			fz_throw(ctx, err_type, "read of a block we don't have (C) (offset=%ld)", read_point);
+			fz_throw(ctx, err_type, "read of a block we don't have (C) (offset=%lld)", read_point);
 		}
 		block++;
 		memcpy(buf, state->buffer + read_point, left_over);
@@ -453,7 +453,7 @@ static int cs_next(fz_context *ctx, fz_stream *stream,
 			stream->pos += len_read;
 			/* If we haven't fetched anything, throw. */
 			if (len_read == 0)
-				fz_throw(ctx, err_type, "read of a block we don't have (D) (offset=%ld)", read_point);
+				fz_throw(ctx, err_type, "read of a block we don't have (D) (offset=%lld)", read_point);
 			/* Otherwise, we got at least one byte, so we can safely return that. */
 			return *stream->rp++;
 		}
@@ -478,7 +478,7 @@ static int cs_next(fz_context *ctx, fz_stream *stream,
 			stream->pos += len_read;
 			/* If we haven't fetched anything, throw. */
 			if (len_read == 0)
-				fz_throw(ctx, err_type, "read of a block we don't have (E) (offset=%ld)", read_point);
+				fz_throw(ctx, err_type, "read of a block we don't have (E) (offset=%lld)", read_point);
 			/* Otherwise, we got at least one byte, so we can safely return that. */
 			return *stream->rp++;
 		}
