diff --git a/core/mule.c b/core/mule.c index d54822c3..b003d88b 100644 --- a/core/mule.c +++ b/core/mule.c @@ -198,7 +198,7 @@ void uwsgi_mule_handler() { } } if (!found) - uwsgi_log("*** mule %d received a %zd bytes message ***\n", uwsgi.muleid, len); + uwsgi_log("*** mule %d received a %ld bytes message ***\n", uwsgi.muleid, (long) len); } } } diff --git a/core/protocol.c b/core/protocol.c index 87ed401f..0bcc8a66 100644 --- a/core/protocol.c +++ b/core/protocol.c @@ -1376,7 +1376,7 @@ int uwsgi_hooked_parse_dict_dgram(int fd, char *buffer, size_t len, uint8_t modi #ifdef UWSGI_DEBUG - uwsgi_log("RLEN: %zd\n", rlen); + uwsgi_log("RLEN: %ld\n", (long) rlen); #endif // check for valid dict 4(header) 2(non-zero key)+1 2(value) diff --git a/core/spooler.c b/core/spooler.c index 46c8de6a..d6a36f19 100644 --- a/core/spooler.c +++ b/core/spooler.c @@ -245,7 +245,7 @@ int spool_request(struct uwsgi_spooler *uspool, char *filename, int rn, int core close(fd); if (!uwsgi.spooler_quiet) - uwsgi_log("[spooler] written %zd bytes to file %s\n", size + body_len + 4, filename); + uwsgi_log("[spooler] written %lu bytes to file %s\n", (unsigned long) size + body_len + 4, filename); // and here waiting threads can continue uwsgi_unlock(uspool->lock); diff --git a/core/utils.c b/core/utils.c index 84690e42..32daa211 100644 --- a/core/utils.c +++ b/core/utils.c @@ -229,7 +229,7 @@ char *uwsgi_get_cwd() { if (getcwd(cwd, newsize) == NULL && errno == ERANGE) { newsize += 256; - uwsgi_log("need a bigger buffer (%zd bytes) for getcwd(). doing reallocation.\n", newsize); + uwsgi_log("need a bigger buffer (%lu bytes) for getcwd(). doing reallocation.\n", (unsigned long) newsize); free(cwd); cwd = uwsgi_malloc(newsize); if (getcwd(cwd, newsize) == NULL) { @@ -4182,7 +4182,7 @@ void uwsgi_setup_post_buffering() { if (uwsgi.post_buffering_bufsize < uwsgi.post_buffering) { uwsgi.post_buffering_bufsize = uwsgi.post_buffering; - uwsgi_log("setting request body buffering size to %zd bytes\n", uwsgi.post_buffering_bufsize); + uwsgi_log("setting request body buffering size to %lu bytes\n", (unsigned long) uwsgi.post_buffering_bufsize); } } diff --git a/core/uwsgi.c b/core/uwsgi.c index 095e1b9f..415ad4c1 100644 --- a/core/uwsgi.c +++ b/core/uwsgi.c @@ -2348,7 +2348,7 @@ int uwsgi_start(void *v_argv) { (void) pthread_attr_init(&uwsgi.threads_attr); if (uwsgi.threads_stacksize) { if (pthread_attr_setstacksize(&uwsgi.threads_attr, uwsgi.threads_stacksize * 1024) == 0) { - uwsgi_log("threads stack size set to %zdk\n", uwsgi.threads_stacksize); + uwsgi_log("threads stack size set to %luk\n", (unsigned long) uwsgi.threads_stacksize); } else { uwsgi_log("!!! unable to set requested threads stacksize !!!\n"); diff --git a/plugins/lua/lua_plugin.c b/plugins/lua/lua_plugin.c index efde5f45..6a2a2a9d 100644 --- a/plugins/lua/lua_plugin.c +++ b/plugins/lua/lua_plugin.c @@ -323,7 +323,7 @@ static int uwsgi_lua_input(lua_State *L) { sum = lua_tonumber(L, 2); if (n > 1) { - uwsgi_log("requested %zd bytes\n", sum); + uwsgi_log("requested %ld bytes\n", (long) sum); } buf = uwsgi_malloc(sum); @@ -666,7 +666,7 @@ uint16_t uwsgi_lua_rpc(void * func, uint8_t argc, char **argv, uint16_t argvs[], sv = lua_tolstring(L, -1, &sl); - uwsgi_log("sv = %s sl = %zd\n", sv, sl); + uwsgi_log("sv = %s sl = %lu\n", sv, (unsigned long) sl); if (sl <= 0xffff) { memcpy(buffer, sv, sl); return sl;