diff options
Diffstat (limited to 'ext/fs')
-rw-r--r-- | ext/fs/30_fs.js | 5 | ||||
-rw-r--r-- | ext/fs/std_fs.rs | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/ext/fs/30_fs.js b/ext/fs/30_fs.js index f7c07f26a..a149f653d 100644 --- a/ext/fs/30_fs.js +++ b/ext/fs/30_fs.js @@ -244,7 +244,7 @@ function createByteStruct(types) { // types can be "date", "bool" or "u64". let offset = 0; let str = - 'const unix = Deno.build.os === "darwin" || Deno.build.os === "linux"; return {'; + 'const unix = Deno.build.os === "darwin" || Deno.build.os === "linux" || Deno.build.os === "openbsd" || Deno.build.os === "freebsd"; return {'; const typeEntries = ObjectEntries(types); for (let i = 0; i < typeEntries.length; ++i) { let { 0: name, 1: type } = typeEntries[i]; @@ -309,7 +309,8 @@ const { 0: statStruct, 1: statBuf } = createByteStruct({ }); function parseFileInfo(response) { - const unix = core.build.os === "darwin" || core.build.os === "linux"; + const unix = core.build.os === "darwin" || core.build.os === "linux" || + core.build.os === "freebsd" || core.build.os === "openbsd"; return { isFile: response.isFile, isDirectory: response.isDirectory, diff --git a/ext/fs/std_fs.rs b/ext/fs/std_fs.rs index 9baf74a2a..b2923abb1 100644 --- a/ext/fs/std_fs.rs +++ b/ext/fs/std_fs.rs @@ -66,7 +66,11 @@ impl FileSystem for RealFs { { Ok(r.bits()) } - #[cfg(target_os = "macos")] + #[cfg(any( + target_os = "macos", + target_os = "openbsd", + target_os = "freebsd" + ))] { Ok(r.bits() as u32) } |