diff options
-rw-r--r-- | skypeweb/libskypeweb.h | 12 | ||||
-rw-r--r-- | skypeweb/skypeweb_contacts.c | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/skypeweb/libskypeweb.h b/skypeweb/libskypeweb.h index e38739d..190a8c5 100644 --- a/skypeweb/libskypeweb.h +++ b/skypeweb/libskypeweb.h @@ -28,6 +28,7 @@ #include <glib.h> +#include <inttypes.h> #include <errno.h> #include <string.h> #include <glib/gi18n.h> @@ -45,6 +46,17 @@ # endif /* __GNUC__ >= 4 */ #endif /* G_GNUC_NULL_TERMINATED */ +// workaround for MinGW32 which doesn't support "%zu"; see also https://stackoverflow.com/a/44383330 +#ifdef _WIN32 +# ifdef _WIN64 +# define PRI_SIZET PRIu64 +# else +# define PRI_SIZET PRIu32 +# endif +#else +# define PRI_SIZET "zu" +#endif + #include "purplecompat.h" #ifdef _WIN32 diff --git a/skypeweb/skypeweb_contacts.c b/skypeweb/skypeweb_contacts.c index 36aa53f..eb0cbd2 100644 --- a/skypeweb/skypeweb_contacts.c +++ b/skypeweb/skypeweb_contacts.c @@ -616,7 +616,7 @@ skypeweb_xfer_send_contents_reader(PurpleHttpConnection *con, gchar *buf, size_t PurpleXfer *xfer = swft->xfer; gsize read;
- purple_debug_info("skypeweb", "Asked %zu bytes from offset %zu\n", len, offset); + purple_debug_info("skypeweb", "Asked %" PRI_SIZET " bytes from offset %" PRI_SIZET "\n", len, offset); purple_xfer_set_bytes_sent(xfer, offset); read = purple_xfer_read_file(xfer, (guchar *)buf, len); purple_debug_info("skypeweb", "Read %" G_GSIZE_FORMAT " bytes\n", read);
|