plan9: use unsafe.Slice instead of unsafeheader package

Go 1.18 is the minimum supported Go version and unsafe.Slice was
introduced in Go 1.17.

Change-Id: I696dba9b932c522688ee55fdef43d8776f8afbe1
Reviewed-on: https://go-review.googlesource.com/c/sys/+/428516
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
diff --git a/plan9/syscall.go b/plan9/syscall.go
index a25223b..ea97128 100644
--- a/plan9/syscall.go
+++ b/plan9/syscall.go
@@ -29,8 +29,6 @@
 	"bytes"
 	"strings"
 	"unsafe"
-
-	"golang.org/x/sys/internal/unsafeheader"
 )
 
 // ByteSliceFromString returns a NUL-terminated slice of bytes
@@ -82,12 +80,7 @@
 		ptr = unsafe.Pointer(uintptr(ptr) + 1)
 	}
 
-	var s []byte
-	h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
-	h.Data = unsafe.Pointer(p)
-	h.Len = n
-	h.Cap = n
-
+	s := unsafe.Slice((*byte)(unsafe.Pointer(p)), n)
 	return string(s)
 }