zig/lib/c/sys/file.zig
GasInfinity 9cf34a8d81
feat(libzigc): move over some linux syscalls
* does not move all of them, only those which map almost 1:1
* also removes their musl implementation
2026-01-24 20:41:15 +01:00

13 lines
403 B
Zig

const std = @import("std");
const common = @import("../common.zig");
const builtin = @import("builtin");
comptime {
if (builtin.target.isMuslLibC()) {
@export(&flockLinux, .{ .name = "flock", .linkage = common.linkage, .visibility = common.visibility });
}
}
fn flockLinux(fd: c_int, operation: c_int) callconv(.c) c_int {
return common.errno(std.os.linux.flock(fd, operation));
}