| ... | @@ -1902,6 +1902,12 @@ test "openat" { | ... | @@ -1902,6 +1902,12 @@ test "openat" { |
| 1902 | const path = "test_io_uring_openat"; | 1902 | const path = "test_io_uring_openat"; |
| 1903 | defer std.fs.cwd().deleteFile(path) catch {}; | 1903 | defer std.fs.cwd().deleteFile(path) catch {}; |
| 1904 | | 1904 | |
| | 1905 | // Workaround for LLVM bug: https://github.com/ziglang/zig/issues/12014 |
| | 1906 | const path_addr = if (builtin.zig_backend == .stage2_llvm) p: { |
| | 1907 | var workaround = path; |
| | 1908 | break :p @ptrToInt(workaround); |
| | 1909 | } else @ptrToInt(path); |
| | 1910 | |
| 1905 | const flags: u32 = os.O.CLOEXEC | os.O.RDWR | os.O.CREAT; | 1911 | const flags: u32 = os.O.CLOEXEC | os.O.RDWR | os.O.CREAT; |
| 1906 | const mode: os.mode_t = 0o666; | 1912 | const mode: os.mode_t = 0o666; |
| 1907 | const sqe_openat = try ring.openat(0x33333333, linux.AT.FDCWD, path, flags, mode); | 1913 | const sqe_openat = try ring.openat(0x33333333, linux.AT.FDCWD, path, flags, mode); |
| ... | @@ -1911,7 +1917,7 @@ test "openat" { | ... | @@ -1911,7 +1917,7 @@ test "openat" { |
| 1911 | .ioprio = 0, | 1917 | .ioprio = 0, |
| 1912 | .fd = linux.AT.FDCWD, | 1918 | .fd = linux.AT.FDCWD, |
| 1913 | .off = 0, | 1919 | .off = 0, |
| 1914 | .addr = @ptrToInt(path), | 1920 | .addr = path_addr, |
| 1915 | .len = mode, | 1921 | .len = mode, |
| 1916 | .rw_flags = flags, | 1922 | .rw_flags = flags, |
| 1917 | .user_data = 0x33333333, | 1923 | .user_data = 0x33333333, |