summaryrefslogtreecommitdiff
path: root/src/Addon.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Addon.zig')
-rw-r--r--src/Addon.zig1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Addon.zig b/src/Addon.zig
index 209c761a..d39a27f3 100644
--- a/src/Addon.zig
+++ b/src/Addon.zig
@@ -112,6 +112,7 @@ fn read(data: []const u8, path: []const u8, words: *[64]LoadedWord, why: *Why) L
/// (dlopen hands back the handle it has for a path it has), unless this
/// process holds those very bytes already.
fn hold(path: []const u8, hash: *[32]u8, why: *Why) ?*Lib {
+ if (comptime compiled_in.len > 0) return failNull(why, "not on this platform: its addons are compiled in", .{});
var z: [4096]u8 = undefined;
const path_z = std.fmt.bufPrintSentinel(&z, "{s}", .{path}, 0) catch return failNull(why, "the path is too long", .{});
const f = std.c.fopen(path_z, "r") orelse return failNull(why, "cannot read it", .{});