diff --git a/src/main.c b/src/main.c index 4bfa163..f49e6a2 100644 --- a/src/main.c +++ b/src/main.c @@ -11,6 +11,10 @@ #include "gc.h" #include "preprocess.h" +#if defined(BUILD_LINUX) + #include +#endif + extern FILE* cfilein; extern int cfileparse(); @@ -77,6 +81,11 @@ static int open_library(char *libname) char *tmp, *full_library_name; int ret; +#if defined(BUILD_LINUX) + if (!strcmp(libname, "m")) + libname = LIBM_SO; +#endif + /* First, attempt to open just the library, if it has been fully * specified. */ if (dlopen(libname, RTLD_NOW | RTLD_GLOBAL))