|
@@ -56,6 +56,11 @@ func main() {
|
|
|
removeFieldsRegex := regexp.MustCompile(`X__glibc\S*`)
|
|
removeFieldsRegex := regexp.MustCompile(`X__glibc\S*`)
|
|
|
b = removeFieldsRegex.ReplaceAll(b, []byte("_"))
|
|
b = removeFieldsRegex.ReplaceAll(b, []byte("_"))
|
|
|
|
|
|
|
|
|
|
+ // Convert [65]int8 to [65]byte in Utsname members to simplify
|
|
|
|
|
+ // conversion to string; see golang.org/issue/20753
|
|
|
|
|
+ convertUtsnameRegex := regexp.MustCompile(`((Sys|Node|Domain)name|Release|Version|Machine)(\s+)\[(\d+)\]u?int8`)
|
|
|
|
|
+ b = convertUtsnameRegex.ReplaceAll(b, []byte("$1$3[$4]byte"))
|
|
|
|
|
+
|
|
|
// We refuse to export private fields on s390x
|
|
// We refuse to export private fields on s390x
|
|
|
if goarch == "s390x" && goos == "linux" {
|
|
if goarch == "s390x" && goos == "linux" {
|
|
|
// Remove cgo padding fields
|
|
// Remove cgo padding fields
|