mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-20 18:23:21 +00:00
Fixed bug with os.arch() on FreeBSD
This commit is contained in:
@@ -1669,7 +1669,11 @@ duk_ret_t ILibDuktape_ScriptContainer_OS_arch(duk_context *ctx)
|
|||||||
#else
|
#else
|
||||||
struct utsname u;
|
struct utsname u;
|
||||||
if (uname(&u) != 0) { return(ILibDuktape_Error(ctx, "Could not determine architecture")); }
|
if (uname(&u) != 0) { return(ILibDuktape_Error(ctx, "Could not determine architecture")); }
|
||||||
if (u.machine[0] == 'i')
|
if (strcmp(u.machine, "amd64") == 0)
|
||||||
|
{
|
||||||
|
duk_push_string(ctx, "x64");
|
||||||
|
}
|
||||||
|
else if (u.machine[0] == 'i')
|
||||||
{
|
{
|
||||||
duk_push_string(ctx, "ia32");
|
duk_push_string(ctx, "ia32");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user