diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-01-18 16:07:04 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-01-18 17:08:21 +0100 |
commit | d9ac7320c80a4629d678fbd905defa831094434c (patch) | |
tree | 69e25b9fc73b90b38a0389e32fdebdd7a45907e5 /file.c | |
parent | bf0948ef5ee92ace7f8f46ab7cf71ddec09a90a1 (diff) |
Build with largefile support
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -26,6 +26,7 @@ #include <time.h> #include <strings.h> #include <dirent.h> +#include <stdint.h> #include <libubox/blobmsg.h> @@ -287,10 +288,8 @@ static const char * uh_file_mime_lookup(const char *path) static const char * uh_file_mktag(struct stat *s, char *buf, int len) { - snprintf(buf, len, "\"%x-%x-%x\"", - (unsigned int) s->st_ino, - (unsigned int) s->st_size, - (unsigned int) s->st_mtime); + snprintf(buf, len, "\"%" PRIx64 "-%" PRIx64 "-%" PRIx64 "\"", + s->st_ino, s->st_size, s->st_mtime); return buf; } @@ -580,7 +579,7 @@ static void uh_file_data(struct client *cl, struct path_info *pi, int fd) ustream_printf(cl->us, "Content-Type: %s\r\n", uh_file_mime_lookup(pi->name)); - ustream_printf(cl->us, "Content-Length: %i\r\n\r\n", + ustream_printf(cl->us, "Content-Length: %" PRIu64 "\r\n\r\n", pi->stat.st_size); |