From d2fe4328281cbb3e783b05f95ecfb02a4f22989c Mon Sep 17 00:00:00 2001 From: ari melody Date: Mon, 24 Jun 2024 17:37:12 +0100 Subject: [PATCH] windows build fixes --- build.ps1 | 3 +++ src/main.c | 2 +- src/parsers/json.c | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 build.ps1 diff --git a/build.ps1 b/build.ps1 new file mode 100644 index 0000000..09a2837 --- /dev/null +++ b/build.ps1 @@ -0,0 +1,3 @@ +New-Item -ItemType Directory -Force -Path ./bin/ + +gcc -Wall -o ./bin/compile ./src/*.c ./src/parsers/*.c diff --git a/src/main.c b/src/main.c index e0bc1a1..63b9f3c 100644 --- a/src/main.c +++ b/src/main.c @@ -72,7 +72,7 @@ int main(int argc, char **argv) { } // get length of file - fseek(input_file, -sizeof(char), SEEK_END); + fseek(input_file, (long)-sizeof(char), SEEK_END); size_t length = ftell(input_file); fseek(input_file, 0, SEEK_SET); diff --git a/src/parsers/json.c b/src/parsers/json.c index 757b4b8..46f9888 100644 --- a/src/parsers/json.c +++ b/src/parsers/json.c @@ -1,6 +1,7 @@ #include "json.h" #include #include +#include #include #include