mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-05 08:37:31 -04:00
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 <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
committed by
Tobias Klauser
parent
e5ecc2a674
commit
11f53e0313
+2
-2
@@ -230,8 +230,8 @@ struct sockaddr_rc {
|
|||||||
// copied from /usr/include/linux/un.h
|
// copied from /usr/include/linux/un.h
|
||||||
struct my_sockaddr_un {
|
struct my_sockaddr_un {
|
||||||
sa_family_t sun_family;
|
sa_family_t sun_family;
|
||||||
#if defined(__ARM_EABI__) || defined(__powerpc64__)
|
#if defined(__ARM_EABI__) || defined(__powerpc64__) || defined(__riscv)
|
||||||
// on ARM char is by default unsigned
|
// on some platforms char is unsigned by default
|
||||||
signed char sun_path[108];
|
signed char sun_path[108];
|
||||||
#else
|
#else
|
||||||
char sun_path[108];
|
char sun_path[108];
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ type RawSockaddrInet6 struct {
|
|||||||
|
|
||||||
type RawSockaddrUnix struct {
|
type RawSockaddrUnix struct {
|
||||||
Family uint16
|
Family uint16
|
||||||
Path [108]uint8
|
Path [108]int8
|
||||||
}
|
}
|
||||||
|
|
||||||
type RawSockaddrLinklayer struct {
|
type RawSockaddrLinklayer struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user