diff --git a/run.c b/run.c index d8f153e..5d2c487 100644 --- a/run.c +++ b/run.c @@ -483,7 +483,7 @@ int main(int argc, char *argv[]) { TransformerWeights weights; int fd = 0; // file descriptor for memory mapping float* data = NULL; // memory mapped data pointer - long file_size; // size of the checkpoint file in bytes + ssize_t file_size; // size of the checkpoint file in bytes { FILE *file = fopen(checkpoint, "rb"); if (!file) { printf("Couldn't open file %s\n", checkpoint); return 1; } diff --git a/win.h b/win.h index 12c7f39..c15ee06 100644 --- a/win.h +++ b/win.h @@ -5,6 +5,8 @@ #include #include +#define ssize_t __int64 +#define ftell _ftelli64 // Below code is originally from mman-win32 //