diff --git a/README.md b/README.md index b4df56c..ef0b77d 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,6 @@ cd tpch/tpch-dbgen make ``` -Notes: - -- For MacOS, the above `make` command will result in an error while compiling like below, - - ```shell - bm_utils.c:71:10: fatal error: 'malloc.h' file not found - #include - ^~~~~~~~~~ - 1 error generated. - make: *** [bm_utils.o] Error 1 - ``` - To fix this, change the import statement `#include ` to `#include ` in the files where error - is reported (`bm_utils.c` and `varsub.c`) and then re-run the command `make`. - ### Execute ```shell diff --git a/run.sh b/run.sh index 2989af9..aaa0f36 100755 --- a/run.sh +++ b/run.sh @@ -1,5 +1,5 @@ export RUN_LOG_TIMINGS=1 -export SCALE_FACTOR=1 +export SCALE_FACTOR=1.0 echo run with cached IO make tables diff --git a/tpch-dbgen/bm_utils.c b/tpch-dbgen/bm_utils.c index cbfc400..02ba110 100644 --- a/tpch-dbgen/bm_utils.c +++ b/tpch-dbgen/bm_utils.c @@ -68,7 +68,11 @@ #include #include #ifndef _POSIX_SOURCE -#include +#ifdef __APPLE__ + #include +#else + #include +#endif #endif /* POSIX_SOURCE */ #include #include diff --git a/tpch-dbgen/varsub.c b/tpch-dbgen/varsub.c index 5fbdf46..c51ce14 100644 --- a/tpch-dbgen/varsub.c +++ b/tpch-dbgen/varsub.c @@ -41,7 +41,11 @@ */ #include #ifndef _POSIX_SOURCE -#include +#ifdef __APPLE__ + #include +#else + #include +#endif #endif /* POSIX_SOURCE */ #if (defined(_POSIX_)||!defined(WIN32)) #include