diff options
author | 2025-01-14 14:23:28 +0000 | |
---|---|---|
committer | 2025-01-14 14:23:28 +0000 | |
commit | b8ef9fc4bcccc6c024edaa8e9c91a6bf87f83dd9 (patch) | |
tree | 68eaf966c80237e18993e887c8583355f0943ca7 /vendor/golang.org/x/sys/unix/syscall_dragonfly.go | |
parent | [chore] better dns validation (#3644) (diff) | |
download | gotosocial-b8ef9fc4bcccc6c024edaa8e9c91a6bf87f83dd9.tar.xz |
bump uptrace/bun dependencies from 1.2.6 to 1.2.8 (#3645)
Diffstat (limited to 'vendor/golang.org/x/sys/unix/syscall_dragonfly.go')
-rw-r--r-- | vendor/golang.org/x/sys/unix/syscall_dragonfly.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go index 97cb916f2..be8c00207 100644 --- a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go +++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go @@ -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 */ |