From 1b93a7a89512d1250b3b6069aa788a522625ab71 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 20 Aug 2015 11:08:22 +0200 Subject: stream_libarchive: fix libarchive callback signature libarchive uses a quite confusing ifdeffery mess for some of the types used in callbacks. Currently, archive_read_set_seek_callback() causes a warning at least on Windows due to mismatching return type. The header file uses __LA_INT64_T as return type, so I think the user is intended to use int64_t. (The ssize_t return type for the read_cb seems correct, on the other hand.) --- stream/stream_libarchive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stream/stream_libarchive.c b/stream/stream_libarchive.c index 6a39f8fac8..796c5c0b37 100644 --- a/stream/stream_libarchive.c +++ b/stream/stream_libarchive.c @@ -31,7 +31,7 @@ static ssize_t read_cb(struct archive *arch, void *priv, const void **buffer) return MPMAX(res, 0); } -static ssize_t seek_cb(struct archive *arch, void *priv, +static int64_t seek_cb(struct archive *arch, void *priv, int64_t offset, int whence) { struct mp_archive *mpa = priv; -- cgit v1.2.3