linux compatibility for blz.c

This commit is contained in:
bjoern
2015-04-25 16:01:15 +02:00
parent aff895e26e
commit 0bd1d28aee

View File

@@ -21,6 +21,19 @@
#include <stdlib.h>
#include <string.h>
#ifdef __linux
#define strcmpi strcasecmp
#include <sys/stat.h>
long filelength(int fd)
{
struct stat st;
fstat(fd, &st);
return st.st_size;
}
#endif
/*----------------------------------------------------------------------------*/
#define CMD_DECODE 0x00 // decode
#define CMD_ENCODE 0x01 // encode