mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 10:05:10 +01:00
* does not move all of them, only those which map almost 1:1 * also removes their musl implementation
13 lines
403 B
Zig
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));
|
|
}
|