summaryrefslogtreecommitdiff
path: root/libgo/go/syscall
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2022-06-14 11:33:42 -0700
committerIan Lance Taylor <iant@golang.org>2022-06-17 14:27:06 -0700
commit7f195a2270910a6ed08bd76e3a16b0a6503f9faf (patch)
tree053387a6fe016bd4420765eb3c45415787fae6f7 /libgo/go/syscall
parenta284fadcce8ef443cc3cc047a8017745efb51758 (diff)
downloadgcc-7f195a2270910a6ed08bd76e3a16b0a6503f9faf.tar.gz
libgo: permit loff_t and off_t to be macros
They are macros in musl libc, rather than typedefs, and -fgo-dump-spec doesn't handle that case. Based on patch by Sören Tempel. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/412075
Diffstat (limited to 'libgo/go/syscall')
-rw-r--r--libgo/go/syscall/libcall_linux.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/libgo/go/syscall/libcall_linux.go b/libgo/go/syscall/libcall_linux.go
index 7bec2fbaeb5..19ae4393cf1 100644
--- a/libgo/go/syscall/libcall_linux.go
+++ b/libgo/go/syscall/libcall_linux.go
@@ -210,20 +210,20 @@ func Gettid() (tid int) {
//sys Setxattr(path string, attr string, data []byte, flags int) (err error)
//setxattr(path *byte, name *byte, value *byte, size Size_t, flags _C_int) _C_int
-//sys splice(rfd int, roff *_loff_t, wfd int, woff *_loff_t, len int, flags int) (n int64, err error)
-//splice(rfd _C_int, roff *_loff_t, wfd _C_int, woff *_loff_t, len Size_t, flags _C_uint) Ssize_t
+//sys splice(rfd int, roff *_libgo_loff_t_type, wfd int, woff *_libgo_loff_t_type, len int, flags int) (n int64, err error)
+//splice(rfd _C_int, roff *_libgo_loff_t_type, wfd _C_int, woff *_libgo_loff_t_type, len Size_t, flags _C_uint) Ssize_t
func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
- var lroff _loff_t
- var plroff *_loff_t
+ var lroff _libgo_loff_t_type
+ var plroff *_libgo_loff_t_type
if roff != nil {
- lroff = _loff_t(*roff)
+ lroff = _libgo_loff_t_type(*roff)
plroff = &lroff
}
- var lwoff _loff_t
- var plwoff *_loff_t
+ var lwoff _libgo_loff_t_type
+ var plwoff *_libgo_loff_t_type
if woff != nil {
- lwoff = _loff_t(*woff)
+ lwoff = _libgo_loff_t_type(*woff)
plwoff = &lwoff
}
n, err = splice(rfd, plroff, wfd, plwoff, len, flags)