Replace syscall.Dup2 calls with syscall.Dup3, as syscall.Dup2 is not
supported for arm64.

Solves below error:
-- snip --
Log data follows:
| DEBUG: Executing shell function do_compile_ptest_base
...
| # import/vendor/github.com/onsi/ginkgo/internal/remote
| 
../../vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_unix.go:34:2:
 undefined: syscall.Dup2
| 
../../vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_unix.go:35:2:
 undefined: syscall.Dup2
-- snip --

Signed-off-by: Jagadeesh Krishnanjanappa <[email protected]>
---
 recipes-networking/cni/cni_git.bb | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/recipes-networking/cni/cni_git.bb 
b/recipes-networking/cni/cni_git.bb
index 427a812..c83a56e 100644
--- a/recipes-networking/cni/cni_git.bb
+++ b/recipes-networking/cni/cni_git.bb
@@ -29,6 +29,10 @@ inherit go
 inherit goarch
 
 do_compile() {
+       if [ "${TARGET_GOARCH}" = "arm64" ]; then
+               sed -i "s:syscall.Dup2\(.*\))$:syscall.Dup3\1, 0):g" \
+               
${S}/src/import/vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_unix.go
 
+       fi
        export GOARCH="${TARGET_GOARCH}"
        export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
        export GOPATH="${S}/src/import:${S}/src/import/vendor"
-- 
2.7.4

-- 
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Reply via email to