diff options
| author | Tobias Klauser <tklauser@distanz.ch> | 2019-11-01 11:24:17 +0100 |
|---|---|---|
| committer | Tobias Klauser <tobias.klauser@gmail.com> | 2019-11-01 16:05:22 +0000 |
| commit | 8d45e612f1255619e8637acff5546c09f0aa3e67 (patch) | |
| tree | 1efb0bbdffe22affc5e87e248502d3d5ad0b40dd /src/syscall/types_linux.go | |
| parent | a570fcf74bdf652f453ed5dc0d8a41b15f1af8de (diff) | |
| download | go-8d45e612f1255619e8637acff5546c09f0aa3e67.tar.xz | |
syscall: add support for linux/riscv64
Based on the riscv-go port and the linux/riscv64 files in x/sys/unix.
Updates #27532
Change-Id: Ib33a59a61f6b2721b12292c18f1fc9f9d0509cd3
Reviewed-on: https://go-review.googlesource.com/c/go/+/204659
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/syscall/types_linux.go')
| -rw-r--r-- | src/syscall/types_linux.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/syscall/types_linux.go b/src/syscall/types_linux.go index fd8ad94c88..9c9c521af4 100644 --- a/src/syscall/types_linux.go +++ b/src/syscall/types_linux.go @@ -76,8 +76,8 @@ struct sockaddr_any { // copied from /usr/include/linux/un.h struct my_sockaddr_un { sa_family_t sun_family; -#if defined(__ARM_EABI__) || defined(__powerpc64__) || defined(__s390x__) - // on ARM, PPC and s390x char is by default unsigned +#if defined(__ARM_EABI__) || defined(__powerpc64__) || defined(__riscv__) || defined(__s390x__) + // on ARM, PPC, RISC-V, and s390x char is by default unsigned signed char sun_path[108]; #else char sun_path[108]; @@ -116,7 +116,7 @@ struct my_epoll_event { // alignment requirements of EABI int32_t padFd; #endif -#if defined(__powerpc64__) || defined(__s390x__) +#if defined(__powerpc64__) || defined(__s390x__) || (defined(__riscv_xlen) && __riscv_xlen == 64) int32_t _padFd; #endif int32_t fd; |
