golang.org/x/net@v0.25.1-0.20240516223405-c87a5b62e243/lif/sys.go (about) 1 // Copyright 2017 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 //go:build solaris 6 7 package lif 8 9 import "unsafe" 10 11 var nativeEndian binaryByteOrder 12 13 func init() { 14 i := uint32(1) 15 b := (*[4]byte)(unsafe.Pointer(&i)) 16 if b[0] == 1 { 17 nativeEndian = littleEndian 18 } else { 19 nativeEndian = bigEndian 20 } 21 }