Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions internal/cmd/gentypes/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ package sys

import (
"unsafe"
"structs"
)

`)
Expand Down Expand Up @@ -758,6 +759,8 @@ func outputPatchedStruct(gf *btf.GoFormatter, w *bytes.Buffer, id string, s *btf
return err
}

decl = strings.Replace(decl, "struct {", "struct { structs.HostLayout;", 1)

w.WriteString(decl)
w.WriteString("\n\n")
return nil
Expand Down
2 changes: 2 additions & 0 deletions internal/sys/ptr_32_be.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
package sys

import (
"structs"
"unsafe"
)

// Pointer wraps an unsafe.Pointer to be 64bit to
// conform to the syscall specification.
type Pointer struct {
structs.HostLayout
pad uint32
ptr unsafe.Pointer
}
2 changes: 2 additions & 0 deletions internal/sys/ptr_32_le.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
package sys

import (
"structs"
"unsafe"
)

// Pointer wraps an unsafe.Pointer to be 64bit to
// conform to the syscall specification.
type Pointer struct {
structs.HostLayout
ptr unsafe.Pointer
pad uint32
}
2 changes: 2 additions & 0 deletions internal/sys/ptr_64.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
package sys

import (
"structs"
"unsafe"
)

// Pointer wraps an unsafe.Pointer to be 64bit to
// conform to the syscall specification.
type Pointer struct {
structs.HostLayout
ptr unsafe.Pointer
}
Loading
Loading