From f9ea9801058aa98a421784da12b76cda0b4c6cf2 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 29 Oct 2024 15:39:02 -0700 Subject: [PATCH] syscall: don't define syscall stub on Hurd Patch from Samuel Thibault. Change-Id: I782d6c702c086352a61df1574747bab0745ff545 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/623415 Reviewed-by: Ian Lance Taylor Reviewed-by: Cherry Mui --- libgo/go/syscall/syscall_funcs.go | 4 ++-- libgo/go/syscall/syscall_funcs_stubs.go | 4 ++-- libgo/runtime/go-nosys.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libgo/go/syscall/syscall_funcs.go b/libgo/go/syscall/syscall_funcs.go index a906fa5a4..fc14cb182 100644 --- a/libgo/go/syscall/syscall_funcs.go +++ b/libgo/go/syscall/syscall_funcs.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build darwin || dragonfly || freebsd || hurd || linux || netbsd || openbsd || solaris -// +build darwin dragonfly freebsd hurd linux netbsd openbsd solaris +//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris +// +build darwin dragonfly freebsd linux netbsd openbsd solaris package syscall diff --git a/libgo/go/syscall/syscall_funcs_stubs.go b/libgo/go/syscall/syscall_funcs_stubs.go index 11f12bd9a..e37a6483b 100644 --- a/libgo/go/syscall/syscall_funcs_stubs.go +++ b/libgo/go/syscall/syscall_funcs_stubs.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build aix || rtems -// +build aix rtems +//go:build aix || hurd || rtems +// +build aix hurd rtems // These are stubs. diff --git a/libgo/runtime/go-nosys.c b/libgo/runtime/go-nosys.c index 30222df78..cd3e7664c 100644 --- a/libgo/runtime/go-nosys.c +++ b/libgo/runtime/go-nosys.c @@ -504,7 +504,7 @@ strerror_r (int errnum, char *buf, size_t buflen) #endif /* ! HAVE_STRERROR_R */ -#ifndef HAVE_SYSCALL +#if !defined(HAVE_SYSCALL) && !defined(__GNU__) /* GNU/Hurd already has a stub */ int syscall(int number __attribute__ ((unused)), ...) {