aboutsummaryrefslogtreecommitdiff
path: root/libgo/go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2014-04-17 23:13:39 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2014-04-17 23:13:39 +0000
commite315e8a5b9386a91adf31910760da6cc1b9ca487 (patch)
tree4ed3d357f795efbd0d8b9aed66dc4951691f0a2e /libgo/go
parent342e7873442fd9cb0f50f45f500911e44a6f159d (diff)
downloadgcc-e315e8a5b9386a91adf31910760da6cc1b9ca487.zip
gcc-e315e8a5b9386a91adf31910760da6cc1b9ca487.tar.gz
gcc-e315e8a5b9386a91adf31910760da6cc1b9ca487.tar.bz2
gofrontend: avoid use of unsafe.Sizeof extension
Avoid the use of a gccgo language extension which allows unsafe.Sizeof to accept a type by passing an expression of the relevant type. From-SVN: r209503
Diffstat (limited to 'libgo/go')
-rw-r--r--libgo/go/syscall/libcall_posix.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgo/go/syscall/libcall_posix.go b/libgo/go/syscall/libcall_posix.go
index 8f5b020..b9c2d7f 100644
--- a/libgo/go/syscall/libcall_posix.go
+++ b/libgo/go/syscall/libcall_posix.go
@@ -138,7 +138,7 @@ func (w WaitStatus) TrapCause() int
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
//select(nfd _C_int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) _C_int
-const nfdbits = int(unsafe.Sizeof(fds_bits_type) * 8)
+const nfdbits = int(unsafe.Sizeof(fds_bits_type(0)) * 8)
type FdSet struct {
Bits [(FD_SETSIZE + nfdbits - 1) / nfdbits]fds_bits_type