diff options
author | Ian Lance Taylor <iant@golang.org> | 2021-12-29 15:08:32 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-12-29 15:52:23 -0800 |
commit | 62c3f75fd29e93054f3aeb8a623fd52c98c3db0b (patch) | |
tree | d0dc1cd7f4e0d529916835e554266da48fb10940 /libgo | |
parent | e5acfcad98f3fa33e141f4e6bc06f7d7c13496e1 (diff) |
compiler, libgo: don't pad sparc64-linux epollevent
Change the compiler to not add zero padding because of zero-sized
fields named "_", since those can't be referenced anyhow.
Change the sparc-linux64 epollevent struct to name the alignment
field "_", to avoid zero padding.
Fixes PR go/103847
PR go/103847
* godump.c (go_force_record_alignment): Name the alignment
field "_".
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/374914
Diffstat (limited to 'libgo')
-rwxr-xr-x | libgo/mkrsysinfo.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libgo/mkrsysinfo.sh b/libgo/mkrsysinfo.sh index 18643370645..be150905f91 100755 --- a/libgo/mkrsysinfo.sh +++ b/libgo/mkrsysinfo.sh @@ -98,7 +98,7 @@ if grep '^const _epoll_data_offset ' ${OUT} >/dev/null 2>&1; then echo 'type epollevent struct { events uint32; data [8]byte }' >> ${OUT} elif test "$val" = "8"; then if test "$GOARCH" = "sparc64" -a "$GOOS" = "linux"; then - echo 'type epollevent struct { events uint32; pad [4]byte; data [8]byte; _align [0]int64 }' >> ${OUT} + echo 'type epollevent struct { events uint32; pad [4]byte; data [8]byte; _ [0]int64 }' >> ${OUT} else echo 'type epollevent struct { events uint32; pad [4]byte; data [8]byte }' >> ${OUT} fi |