Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit ec0182f0 authored by rswindell's avatar rswindell

environ is a magic word in msvc2013+, don't use it (fixes crash in msvc2013/2017 build)

parent 4484a017
...@@ -805,7 +805,7 @@ static BOOL js_CreateEnvObject(JSContext* cx, JSObject* glob, char** env) ...@@ -805,7 +805,7 @@ static BOOL js_CreateEnvObject(JSContext* cx, JSObject* glob, char** env)
return(TRUE); return(TRUE);
} }
static BOOL js_init(char** environ) static BOOL js_init(char** env)
{ {
memset(&startup,0,sizeof(startup)); memset(&startup,0,sizeof(startup));
SAFECOPY(startup.load_path, load_path_list); SAFECOPY(startup.load_path, load_path_list);
...@@ -840,7 +840,7 @@ static BOOL js_init(char** environ) ...@@ -840,7 +840,7 @@ static BOOL js_init(char** environ)
} }
/* Environment Object (associative array) */ /* Environment Object (associative array) */
if(!js_CreateEnvObject(js_cx, js_glob, environ)) { if(!js_CreateEnvObject(js_cx, js_glob, env)) {
JS_ENDREQUEST(js_cx); JS_ENDREQUEST(js_cx);
return(FALSE); return(FALSE);
} }
...@@ -1112,7 +1112,7 @@ int parseLogLevel(const char* p) ...@@ -1112,7 +1112,7 @@ int parseLogLevel(const char* p)
/*********************/ /*********************/
/* Entry point (duh) */ /* Entry point (duh) */
/*********************/ /*********************/
int main(int argc, char **argv, char** environ) int main(int argc, char **argv, char** env)
{ {
#ifndef JSDOOR #ifndef JSDOOR
char error[512]; char error[512];
...@@ -1376,7 +1376,7 @@ int main(int argc, char **argv, char** environ) ...@@ -1376,7 +1376,7 @@ int main(int argc, char **argv, char** environ)
recycled=FALSE; recycled=FALSE;
if(!js_init(environ)) { if(!js_init(env)) {
lprintf(LOG_ERR,"!JavaScript initialization failure"); lprintf(LOG_ERR,"!JavaScript initialization failure");
return(do_bail(1)); return(do_bail(1));
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment