To use gguf-tools in Windows doesn't work. The problem is to open the file in READ/WRITE/APPEND mode instead than READ_ONLYMODE.
There are TWO lines to update:
"gguflib.c":
routine: gguf_ctx *gguf_open(const char *filename)
int fd = open(filename,O_RDWR|O_APPEND); --> int fd = open(filename,O_RDONLY);
routine: int gguf_remap(gguf_ctx *ctx)
mmap(0,sb.st_size,PROT_READ|PROT_WRITE,MAP_SHARED,ctx->fd,0); --> mmap(0,sb.st_size,PROT_READ,MAP_SHARED,ctx->fd,0);
To use gguf-tools in Windows doesn't work. The problem is to open the file in READ/WRITE/APPEND mode instead than READ_ONLYMODE.
There are TWO lines to update:
"gguflib.c":
routine:
gguf_ctx *gguf_open(const char *filename)int fd = open(filename,O_RDWR|O_APPEND); --> int fd = open(filename,O_RDONLY);routine:
int gguf_remap(gguf_ctx *ctx)mmap(0,sb.st_size,PROT_READ|PROT_WRITE,MAP_SHARED,ctx->fd,0); --> mmap(0,sb.st_size,PROT_READ,MAP_SHARED,ctx->fd,0);