ffmpeg-6: fix COMPONENT_REVISION
[oi-userland.git] / components / developer / golang-122 / patches / 02_Dup2_golang10.patch
blobfce3c3e49e1e9be052bdfba6e57fef23adc28522
1 --- golang-1.10/src/syscall/zsyscall_solaris_amd64.go 2018-02-16 09:12:19.000000000 +0000
2 +++ golang-1.10/src/syscall/zsyscall_solaris_amd64.go.1 2018-05-01 03:21:18.224140250 +0000
3 @@ -21,6 +21,7 @@
4 //go:cgo_import_dynamic libc_Chroot chroot "libc.so"
5 //go:cgo_import_dynamic libc_Close close "libc.so"
6 //go:cgo_import_dynamic libc_Dup dup "libc.so"
7 +//go:cgo_import_dynamic libc_Dup2 dup2 "libc.so"
8 //go:cgo_import_dynamic libc_Fchdir fchdir "libc.so"
9 //go:cgo_import_dynamic libc_Fchmod fchmod "libc.so"
10 //go:cgo_import_dynamic libc_Fchown fchown "libc.so"
11 @@ -105,6 +106,7 @@
12 //go:linkname libc_Chroot libc_Chroot
13 //go:linkname libc_Close libc_Close
14 //go:linkname libc_Dup libc_Dup
15 +//go:linkname libc_Dup2 libc_Dup2
16 //go:linkname libc_Fchdir libc_Fchdir
17 //go:linkname libc_Fchmod libc_Fchmod
18 //go:linkname libc_Fchown libc_Fchown
19 @@ -192,6 +194,7 @@
20 libc_Chroot,
21 libc_Close,
22 libc_Dup,
23 + libc_Dup2,
24 libc_Fchdir,
25 libc_Fchmod,
26 libc_Fchown,
27 @@ -410,6 +413,14 @@
28 return
31 +func Dup2(oldfd int, newfd int) (err error) {
32 + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Dup2)), 2, uintptr(oldfd), uintptr(newfd), 0, 0, 0, 0)
33 + if e1 != 0 {
34 + err = errnoErr(e1)
35 + }
36 + return
39 func Fchdir(fd int) (err error) {
40 _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Fchdir)), 1, uintptr(fd), 0, 0, 0, 0, 0)
41 if e1 != 0 {