summaryrefslogtreecommitdiff
path: root/vendor/modernc.org/libc/libc_darwin_amd64.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-12-12 15:47:51 +0100
committerLibravatar GitHub <noreply@github.com>2021-12-12 15:47:51 +0100
commit67ac8db190eb82a7758746fb021fa3014f4241b7 (patch)
tree4a4124ad8f0ee9ec8858b109dd0bcc2e567fc144 /vendor/modernc.org/libc/libc_darwin_amd64.go
parentupstep dependencies (#339) (diff)
downloadgotosocial-67ac8db190eb82a7758746fb021fa3014f4241b7.tar.xz
Upstep Go dependencies (#340)
* Upstep Go dependencies * tiny linter fix * Tidy
Diffstat (limited to 'vendor/modernc.org/libc/libc_darwin_amd64.go')
-rw-r--r--vendor/modernc.org/libc/libc_darwin_amd64.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/vendor/modernc.org/libc/libc_darwin_amd64.go b/vendor/modernc.org/libc/libc_darwin_amd64.go
index ab1ed5c46..e8f46c49e 100644
--- a/vendor/modernc.org/libc/libc_darwin_amd64.go
+++ b/vendor/modernc.org/libc/libc_darwin_amd64.go
@@ -377,14 +377,13 @@ func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
// int dup2(int oldfd, int newfd);
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
- panic(todo(""))
- // n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- // if err != 0 {
- // t.setErrno(err)
- // return -1
- // }
+ n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
+ if err != 0 {
+ t.setErrno(err)
+ return -1
+ }
- // return int32(n)
+ return int32(n)
}
// ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize);