Change printf mask %zu -> %lu

for MS VC++ compatibility http://stackoverflow.com/questions/15610053/correct-printf-format-specifier-for-size-t-zu-or-iu
This commit is contained in:
Pavel Pimenov committed 2014-07-07 09:24:48 +04:00
1 parent ac229b6606
commit 82872e86fd
2 files changed
+8 -8

No files matched your search

+1 -1
View File
@@ -13,7 +13,7 @@ static void send_file(struct mg_connection *conn, const char *path) {
if (stat(path, &st) == 0 && (fp = fopen(path, "rb")) != NULL) {
mg_printf(conn, "--myboundary\r\nContent-Type: image/jpeg\r\n"
"Content-Length: %zu\r\n\r\n", st.st_size);
"Content-Length: %llu\r\n\r\n", (unsigned long long) st.st_size);
while ((n = fread(buf, 1, sizeof(buf), fp)) > 0) {
mg_write(conn, buf, n);
}