Skip to content

Commit 7abc39a

Browse files
committed
fix use of At in rmdir syscall
misc changes Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
1 parent 82f9d8c commit 7abc39a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/std/os/linux.zig

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,7 @@ pub fn rmdir(path: [*:0]const u8) usize {
11751175
if (@hasField(SYS, "rmdir")) {
11761176
return syscall1(.rmdir, @intFromPtr(path));
11771177
} else {
1178-
return syscall3(.unlinkat, @as(usize, @bitCast(@as(isize, At.fdcwd))), @intFromPtr(path), @as(u32, @bitCast(At{ .removedir_or_handle_fid = .{ .removedir = true } })));
1178+
return syscall3(.unlinkat, @as(usize, @bitCast(@as(isize, At.fdcwd))), @intFromPtr(path), @as(u32, @bitCast(At{ .removedir = true })));
11791179
}
11801180
}
11811181

@@ -3666,9 +3666,9 @@ pub const W = packed struct(u32) {
36663666
} = @bitCast(false),
36673667
exited: bool = false,
36683668
continued: bool = false,
3669-
_unused: u20 = 0,
3669+
_5: u20 = 0,
36703670
nowait: bool = false,
3671-
_unused_1: u7 = 0,
3671+
_26: u7 = 0,
36723672

36733673
// Deprecated aliases
36743674
pub const NOHANG: u32 = @bitCast(W{ .nohang = true });
@@ -3916,6 +3916,7 @@ pub const Shut = enum(u32) {
39163916
pub const RDWR: u32 = @intFromEnum(Shut.rdwr);
39173917
};
39183918

3919+
/// Deprecated alias to Sock
39193920
pub const SOCK = Sock;
39203921
/// SOCK_* Socket type and flags
39213922
pub const Sock = packed struct(u32) {
@@ -3957,7 +3958,7 @@ pub const Sock = packed struct(u32) {
39573958
_21: u12 = 0,
39583959
};
39593960

3960-
// Deprecated aliases for SOCK
3961+
// Deprecated aliases for SOCK type and flags
39613962
pub const STREAM: u32 = @intFromEnum(Type.stream);
39623963
pub const DGRAM: u32 = @intFromEnum(Type.dgram);
39633964
pub const RAW: u32 = @intFromEnum(Type.raw);

lib/std/os/linux/IoUring.zig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,8 +1384,7 @@ pub fn socket_direct(
13841384
domain: linux.Af,
13851385
socket_type: linux.Sock,
13861386
protocol: linux.IpProto,
1387-
/// flags is unused
1388-
flags: u32,
1387+
flags: u32, // flags is unused
13891388
file_index: u32,
13901389
) !*Sqe {
13911390
const sqe = try self.get_sqe();

0 commit comments

Comments
 (0)