Support for large files on 32 bit systems

This commit is contained in:
Thomas Kolb 2013-01-20 19:33:43 +01:00
parent 1dab3f798c
commit 3cb4e23860
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@ MAGIC_CFLAGS=-DHAVE_MAGIC
MAGIC_LIBS=-lmagic
CC=gcc
CFLAGS+=-Wall -pedantic -std=c99 -D_POSIX_C_SOURCE=20120607L $(MAGIC_CFLAGS)
CFLAGS+=-Wall -pedantic -std=c99 -D_POSIX_C_SOURCE=20120607L -D_FILE_OFFSET_BITS=64 $(MAGIC_CFLAGS)
LIBS=-lmicrohttpd $(MAGIC_LIBS)
TARGET=fileshare

View File

@ -21,11 +21,11 @@
struct Entry {
char *name;
size_t size;
off_t size;
uint8_t flags;
};
const char* format_size(size_t s) {
const char* format_size(off_t s) {
static char buf[32];
const char *prefixes = " kMGTPEZY";
float fs = s;