Update x/sys, x/net and bbolt modules to support Risc-V

Signed-off-by: CarlosEDP <me@carlosedp.com>
This commit is contained in:
CarlosEDP
2019-06-07 16:53:51 -03:00
parent 02ed02eca5
commit fb6b0ae4c6
168 changed files with 41350 additions and 9472 deletions

View File

@@ -18,10 +18,13 @@ func cmsgAlignOf(salen int) int {
salign := SizeofPtr
switch runtime.GOOS {
case "darwin", "dragonfly", "solaris":
// NOTE: It seems like 64-bit Darwin, DragonFly BSD and
// Solaris kernels still require 32-bit aligned access to
// network subsystem.
case "aix":
// There is no alignment on AIX.
salign = 1
case "darwin", "dragonfly", "solaris", "illumos":
// NOTE: It seems like 64-bit Darwin, DragonFly BSD,
// illumos, and Solaris kernels still require 32-bit
// aligned access to network subsystem.
if SizeofPtr == 8 {
salign = 4
}