From 43f2a6dcb8b81e9384993042e036cf6675425ca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Thu, 10 Oct 2024 21:35:50 -0400 Subject: [PATCH] fix TUNSETIFF constant --- src/tunnel.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tunnel.zig b/src/tunnel.zig index c570a83..91260ab 100644 --- a/src/tunnel.zig +++ b/src/tunnel.zig @@ -7,7 +7,7 @@ const log = std.log.scoped(.nyotun); const IFF_TUN = 0x0001; // const IFF_NO_PI = 0x1000; // -const TUNSETIFF = 0x800454ca; // same value on all archs, see go/src/syscall/*.go +const TUNSETIFF = 0x400454ca; // compile a C program, run and see dev: [posix.IFNAMESIZE - 1:0]u8, tunFile: posix.fd_t, @@ -56,7 +56,7 @@ pub fn close(self: *Tunnel) void { const Tunnel = @This(); -test "init tunnel" { +test "init" { var tun = try init("nyotun"); tun.close(); }