Skip to content

Commit 82ab860

Browse files
committed
Haiku: remove support for accept4 for now
1 parent 565e7b0 commit 82ab860

File tree

7 files changed

+5
-37
lines changed

7 files changed

+5
-37
lines changed

src/internal/poll/hook_cloexec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build dragonfly || freebsd || haiku || linux || netbsd || openbsd || solaris
5+
//go:build dragonfly || freebsd || linux || netbsd || openbsd || solaris
66

77
package poll
88

src/internal/poll/sock_cloexec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// This file implements accept for platforms that provide a fast path for
66
// setting SetNonblock and CloseOnExec.
77

8-
//go:build dragonfly || freebsd || haiku || linux || netbsd || openbsd
8+
//go:build dragonfly || freebsd || linux || netbsd || openbsd
99

1010
package poll
1111

src/internal/poll/sys_cloexec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// This file implements accept for platforms that do not provide a fast path for
66
// setting SetNonblock and CloseOnExec.
77

8-
//go:build aix || darwin || (js && wasm) || wasip1
8+
//go:build aix || darwin || haiku || (js && wasm) || wasip1
99

1010
package poll
1111

src/net/internal/socktest/sys_cloexec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build dragonfly || freebsd || haiku || linux || netbsd || openbsd || solaris
5+
//go:build dragonfly || freebsd || linux || netbsd || openbsd || solaris
66

77
package socktest
88

src/net/main_cloexec_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build dragonfly || freebsd || haiku || linux || netbsd || openbsd || solaris
5+
//go:build dragonfly || freebsd || linux || netbsd || openbsd || solaris
66

77
package net
88

src/syscall/syscall_haiku.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -77,26 +77,6 @@ func Pipe(p []int) (err error) {
7777
return
7878
}
7979

80-
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) = libnetwork.accept4
81-
82-
func Accept4(fd int, flags int) (int, Sockaddr, error) {
83-
var rsa RawSockaddrAny
84-
var addrlen _Socklen = SizeofSockaddrAny
85-
nfd, err := accept4(fd, &rsa, &addrlen, flags)
86-
if err != nil {
87-
return 0, nil, err
88-
}
89-
if addrlen > SizeofSockaddrAny {
90-
panic("RawSockaddrAny too small")
91-
}
92-
sa, err := anyToSockaddr(&rsa)
93-
if err != nil {
94-
Close(nfd)
95-
return 0, nil, err
96-
}
97-
return nfd, sa, nil
98-
}
99-
10080
func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
10181
if sa.Port < 0 || sa.Port > 0xFFFF {
10282
return nil, 0, EINVAL

src/syscall/zsyscall_haiku_amd64.go

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)