From 669b2710bfa491adc807476d102c14c57e9ef99c Mon Sep 17 00:00:00 2001 From: WAKAYAMA shirou Date: Sat, 6 Jul 2019 23:49:57 +0900 Subject: [PATCH] [freebsd]host: change freebsd struct for 386 and arm. --- host/host_freebsd_386.go | 18 ++++++------------ host/host_freebsd_arm.go | 19 ++++++------------- 2 files changed, 12 insertions(+), 25 deletions(-) diff --git a/host/host_freebsd_386.go b/host/host_freebsd_386.go index 7f06d8f..88453d2 100644 --- a/host/host_freebsd_386.go +++ b/host/host_freebsd_386.go @@ -1,4 +1,4 @@ -// Created by cgo -godefs - DO NOT EDIT +// Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs types_freebsd.go package host @@ -9,7 +9,7 @@ const ( sizeofInt = 0x4 sizeofLong = 0x4 sizeofLongLong = 0x8 - sizeOfUtmpx = 197 // TODO why should 197 + sizeOfUtmpx = 0xc5 ) type ( @@ -27,17 +27,11 @@ type Utmp struct { } type Utmpx struct { - Type int16 - Tv Timeval + Type uint8 + Tv uint64 Id [8]int8 - Pid int32 + Pid uint32 User [32]int8 Line [16]int8 - Host [125]int8 - // X__ut_spare [64]int8 -} - -type Timeval struct { - Sec [4]byte - Usec [3]byte + Host [128]int8 } diff --git a/host/host_freebsd_arm.go b/host/host_freebsd_arm.go index ac74980..f7d6ede 100644 --- a/host/host_freebsd_arm.go +++ b/host/host_freebsd_arm.go @@ -1,4 +1,4 @@ -// Created by cgo -godefs - DO NOT EDIT +// Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs types_freebsd.go package host @@ -9,7 +9,7 @@ const ( sizeofInt = 0x4 sizeofLong = 0x8 sizeofLongLong = 0x8 - sizeOfUtmpx = 197 // TODO: why should 197, not 0x118 + sizeOfUtmpx = 0xc5 ) type ( @@ -27,18 +27,11 @@ type Utmp struct { } type Utmpx struct { - Type int16 - Tv Timeval + Type uint8 + Tv uint64 Id [8]int8 - Pid int32 + Pid uint32 User [32]int8 Line [16]int8 - Host [125]int8 - // Host [128]int8 - // X__ut_spare [64]int8 -} - -type Timeval struct { - Sec [4]byte - Usec [3]byte + Host [128]int8 }