@@ 2,6 2,7 @@ const Builder = @import("std").build.Bui
const std = @import("std");
pub fn build(b: *Builder) void {
+ const target = b.standardTargetOptions(.{});
const mode = b.standardReleaseOptions();
const lib = b.addStaticLibrary("sodium", "src/sodium.zig");
lib.setBuildMode(mode);
@@ 9,6 10,7 @@ pub fn build(b: *Builder) void {
var tests = b.addTest("src/sodium.zig");
tests.setBuildMode(mode);
+ tests.setTarget(target);
tests.linkSystemLibrary("c");
tests.linkSystemLibrary("sodium");
@@ 44,6 44,7 @@ fn sodiumAlloc(
len: usize,
ptr_align: u29,
len_align: u29,
+ ret_addr: usize,
) Error![]u8 {
var bytes = len;
const alignment = std.math.max(ptr_align, len_align);
@@ 72,8 73,10 @@ fn sodiumAlloc(
fn sodiumResize(
self: *Allocator,
buf: []u8,
+ buf_align: u29,
new_len: usize,
len_align: u29,
+ ret_addr: usize,
) Error!usize {
if (new_len > buf.len) {
return Error.OutOfMemory;