summaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/sys/unix
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2025-01-14 14:23:28 +0000
committerLibravatar GitHub <noreply@github.com>2025-01-14 14:23:28 +0000
commitb8ef9fc4bcccc6c024edaa8e9c91a6bf87f83dd9 (patch)
tree68eaf966c80237e18993e887c8583355f0943ca7 /vendor/golang.org/x/sys/unix
parent[chore] better dns validation (#3644) (diff)
downloadgotosocial-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')
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_dragonfly.go12
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
*/