INCLUDE (CheckFunctionExists)
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
-ADD_DEFINITIONS(-Os -Wall -Werror -Wmissing-declarations --std=gnu99 -g3)
+ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 -Os -Wall -Werror -Wmissing-declarations --std=gnu99 -g3)
OPTION(TLS_SUPPORT "TLS support" ON)
OPTION(LUA_SUPPORT "Lua support" ON)
#include <time.h>
#include <strings.h>
#include <dirent.h>
+#include <stdint.h>
#include <libubox/blobmsg.h>
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;
}
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);