aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/node/syscall.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2022-07-22 00:58:45 -0700
committerGravatar GitHub <noreply@github.com> 2022-07-22 00:58:45 -0700
commit0d4b4c494243cf73bf704971dcc0711c5882a8aa (patch)
tree997f8cd101803ff023e277a2330ad7bf8472cb59 /src/bun.js/node/syscall.zig
parentc772256e93931f032751474e5ddeccbb92cee847 (diff)
downloadbun-0d4b4c494243cf73bf704971dcc0711c5882a8aa.tar.gz
bun-0d4b4c494243cf73bf704971dcc0711c5882a8aa.tar.zst
bun-0d4b4c494243cf73bf704971dcc0711c5882a8aa.zip
Canary builds (Linux) (#824)canary
* wip * WIP: * WIP * WIP * WIP * WIP * WIP * Update WebKit * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * Update WebKit * WIP * WIP * WIP * WIP * Workaround missing system calls * WIP * WIP * WIP * WIP * WIP * WIP * WIP * Fix baseline detection * WIP * strip debug symbol * Auto-generate canary build Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/bun.js/node/syscall.zig')
-rw-r--r--src/bun.js/node/syscall.zig8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bun.js/node/syscall.zig b/src/bun.js/node/syscall.zig
index b931e9c0e..4378a4762 100644
--- a/src/bun.js/node/syscall.zig
+++ b/src/bun.js/node/syscall.zig
@@ -16,27 +16,29 @@ const C = @import("../../global.zig").C;
const linux = os.linux;
const Maybe = JSC.Maybe;
+// On Linux AARCh64, zig is missing stat & lstat syscalls
+const use_libc = (Environment.isLinux and Environment.isAarch64) or Environment.isMac;
pub const system = if (Environment.isLinux) linux else @import("io").darwin;
pub const S = struct {
pub usingnamespace if (Environment.isLinux) linux.S else std.os.S;
};
const sys = std.os.system;
-const statSym = if (Environment.isMac)
+const statSym = if (use_libc)
C.stat
else if (Environment.isLinux)
linux.stat
else
@compileError("STAT");
-const fstatSym = if (Environment.isMac)
+const fstatSym = if (use_libc)
C.fstat
else if (Environment.isLinux)
linux.fstat
else
@compileError("STAT");
-const lstat64 = if (Environment.isMac)
+const lstat64 = if (use_libc)
C.lstat
else if (Environment.isLinux)
linux.lstat