Support for large files on 32 bit systems
This commit is contained in:
parent
1dab3f798c
commit
3cb4e23860
2
Makefile
2
Makefile
|
@ -2,7 +2,7 @@ MAGIC_CFLAGS=-DHAVE_MAGIC
|
||||||
MAGIC_LIBS=-lmagic
|
MAGIC_LIBS=-lmagic
|
||||||
|
|
||||||
CC=gcc
|
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)
|
LIBS=-lmicrohttpd $(MAGIC_LIBS)
|
||||||
|
|
||||||
TARGET=fileshare
|
TARGET=fileshare
|
||||||
|
|
|
@ -21,11 +21,11 @@
|
||||||
|
|
||||||
struct Entry {
|
struct Entry {
|
||||||
char *name;
|
char *name;
|
||||||
size_t size;
|
off_t size;
|
||||||
uint8_t flags;
|
uint8_t flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
const char* format_size(size_t s) {
|
const char* format_size(off_t s) {
|
||||||
static char buf[32];
|
static char buf[32];
|
||||||
const char *prefixes = " kMGTPEZY";
|
const char *prefixes = " kMGTPEZY";
|
||||||
float fs = s;
|
float fs = s;
|
||||||
|
|
Loading…
Reference in New Issue