summaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2021-12-29 15:08:32 -0800
committerIan Lance Taylor <iant@golang.org>2021-12-29 15:52:23 -0800
commit62c3f75fd29e93054f3aeb8a623fd52c98c3db0b (patch)
treed0dc1cd7f4e0d529916835e554266da48fb10940 /libgo
parente5acfcad98f3fa33e141f4e6bc06f7d7c13496e1 (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-xlibgo/mkrsysinfo.sh2
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