6e75f90eb47a — Nathan Michaels 4 years ago
Update for latest zig master.
2 files changed, 5 insertions(+), 0 deletions(-)

M build.zig
M src/mem.zig
M build.zig +2 -0
@@ 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");
 

          
M src/mem.zig +3 -0
@@ 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;