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