Skip to content

Commit 11f53e0

Browse files
committed
unix: use int8 for RawSockaddrUnix.Path on linux/riscv64
On linux/riscv64, char defaults to unsigned, so explicitly make RawSockaddrUnix.Path signed. Patch by Ryan O'Leary. Updates golang/go#27532 Change-Id: If99a3953462ad98f61d8fafcda3ebb71b44e6018 Reviewed-on: https://go-review.googlesource.com/c/157900 Run-TryBot: Tobias Klauser <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent e5ecc2a commit 11f53e0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: unix/linux/types.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ struct sockaddr_rc {
230230
// copied from /usr/include/linux/un.h
231231
struct my_sockaddr_un {
232232
sa_family_t sun_family;
233-
#if defined(__ARM_EABI__) || defined(__powerpc64__)
234-
// on ARM char is by default unsigned
233+
#if defined(__ARM_EABI__) || defined(__powerpc64__) || defined(__riscv)
234+
// on some platforms char is unsigned by default
235235
signed char sun_path[108];
236236
#else
237237
char sun_path[108];

Diff for: unix/ztypes_linux_riscv64.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)