From 6465652c8768dae2567f693eed04fb6a1b8ce517 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 23 Sep 2016 21:00:43 +0000 Subject: [PATCH] internal/syscall/unix: add getrandom syscall for MIPS and SPARC Reviewed-on: https://go-review.googlesource.com/29678 From-SVN: r240457 --- gcc/go/gofrontend/MERGE | 2 +- .../internal/syscall/unix/getrandom_linux_mips64x.go | 2 +- .../internal/syscall/unix/getrandom_linux_mipsn32.go | 11 +++++++++++ .../internal/syscall/unix/getrandom_linux_mipso32.go | 11 +++++++++++ .../go/internal/syscall/unix/getrandom_linux_sparc.go | 11 +++++++++++ 5 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 libgo/go/internal/syscall/unix/getrandom_linux_mipsn32.go create mode 100644 libgo/go/internal/syscall/unix/getrandom_linux_mipso32.go create mode 100644 libgo/go/internal/syscall/unix/getrandom_linux_sparc.go diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index a3457cfcfbc..3fca47a8966 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -57bf3f21005c4508003f65207282c057e3526ec0 +28b79f1d5a3a8924329128999a21d0693e08a603 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/libgo/go/internal/syscall/unix/getrandom_linux_mips64x.go b/libgo/go/internal/syscall/unix/getrandom_linux_mips64x.go index b328b8f1f0e..02fd1a06423 100644 --- a/libgo/go/internal/syscall/unix/getrandom_linux_mips64x.go +++ b/libgo/go/internal/syscall/unix/getrandom_linux_mips64x.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build mips64 mips64le +// +build mips64 mips64le mipsn64 mipso64 package unix diff --git a/libgo/go/internal/syscall/unix/getrandom_linux_mipsn32.go b/libgo/go/internal/syscall/unix/getrandom_linux_mipsn32.go new file mode 100644 index 00000000000..8f481fa58dd --- /dev/null +++ b/libgo/go/internal/syscall/unix/getrandom_linux_mipsn32.go @@ -0,0 +1,11 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build mipsn32 + +package unix + +// Linux getrandom system call number. +// See GetRandom in getrandom_linux.go. +const randomTrap uintptr = 6317 diff --git a/libgo/go/internal/syscall/unix/getrandom_linux_mipso32.go b/libgo/go/internal/syscall/unix/getrandom_linux_mipso32.go new file mode 100644 index 00000000000..612d00b4af1 --- /dev/null +++ b/libgo/go/internal/syscall/unix/getrandom_linux_mipso32.go @@ -0,0 +1,11 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build mipso32 + +package unix + +// Linux getrandom system call number. +// See GetRandom in getrandom_linux.go. +const randomTrap uintptr = 4353 diff --git a/libgo/go/internal/syscall/unix/getrandom_linux_sparc.go b/libgo/go/internal/syscall/unix/getrandom_linux_sparc.go new file mode 100644 index 00000000000..4874ec1bd86 --- /dev/null +++ b/libgo/go/internal/syscall/unix/getrandom_linux_sparc.go @@ -0,0 +1,11 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build sparc sparc64 + +package unix + +// Linux getrandom system call number. +// See GetRandom in getrandom_linux.go. +const randomTrap uintptr = 347 -- 2.30.2