From 8b5d4c3c0310c1669f8abd0b159985d80771e9f7 Mon Sep 17 00:00:00 2001 From: Alexey Borzenkov Date: Mon, 6 Aug 2012 16:24:08 -0400 Subject: [PATCH] syscall: fix plan9 build broken by CL 6458050 R=golang-dev, rsc CC=golang-dev, r, yarikos https://golang.org/cl/6454104 --- src/pkg/syscall/exec_plan9.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/pkg/syscall/exec_plan9.go b/src/pkg/syscall/exec_plan9.go index 427f9613065..75eaad612a7 100644 --- a/src/pkg/syscall/exec_plan9.go +++ b/src/pkg/syscall/exec_plan9.go @@ -419,11 +419,9 @@ func forkExec(argv0 string, argv []string, attr *ProcAttr) (pid int, err error) if err != nil { return 0, err } - envvalue, err := BytePtrFromString(v[i+1:]) - if err != nil { - return 0, err - } - envvParsed = append(envvParsed, envItem{envname, envvalue, len(v) - i}) + envvalue := make([]byte, len(v)-i) + copy(envvalue, v[i+1:]) + envvParsed = append(envvParsed, envItem{envname, &envvalue[0], len(v) - i}) } }