1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-16 00:03:45 +00:00

Fixed bug with os.arch() on FreeBSD

This commit is contained in:
Bryan Roe
2021-08-26 13:51:13 -07:00
parent 4b19cbad2a
commit 8fdbdb9f4b

View File

@@ -1669,7 +1669,11 @@ duk_ret_t ILibDuktape_ScriptContainer_OS_arch(duk_context *ctx)
#else
struct utsname u;
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");
}