mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-01 13:10:43 +00:00
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:
1 parent
ac229b6606
commit
82872e86fd
2 files changed
+8
-8
No files matched your search
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user