Update deps, update config of golangci-lint, fix some golangci-lint warnings

This commit is contained in:
eleksir
2025-05-27 20:54:22 +03:00
parent 21b5f59c1c
commit f9dd1acc45
78 changed files with 1602 additions and 2205 deletions

View File

@@ -246,6 +246,18 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
return sendfile(outfd, infd, offset, count)
}
func Dup3(oldfd, newfd, flags int) error {
if oldfd == newfd || flags&^O_CLOEXEC != 0 {
return EINVAL
}
how := F_DUP2FD
if flags&O_CLOEXEC != 0 {
how = F_DUP2FD_CLOEXEC
}
_, err := fcntl(oldfd, how, newfd)
return err
}
/*
* Exposed directly
*/