Skip to content

Commit 9c9e2db

Browse files
authored
Merge pull request #167 from thaJeztah/fix_illumos
sockets: fix compilation on illumos
2 parents 754f906 + de1f4dc commit 9c9e2db

3 files changed

Lines changed: 24 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,17 @@ jobs:
6060
run: go build ./...
6161
- name: Test
6262
run: ${{ matrix.test-cmd }}
63+
- name: Cross-build
64+
if: matrix.platform == 'ubuntu-24.04' && matrix.go-version == 'stable'
65+
run: |
66+
for target in $(go tool dist list); do
67+
case "$target" in
68+
android/*|ios/*|js/*|linux/amd64|plan9/*|wasip1/*|windows/amd64)
69+
echo "SKIP $target"
70+
continue
71+
;;
72+
esac
73+
GOOS=${target%/*} GOARCH=${target#*/} go build ./... \
74+
&& echo "PASS $target" \
75+
|| { echo "FAIL $target"; exit 1; }
76+
done
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build !linux && !windows
1+
//go:build darwin || dragonfly || freebsd || netbsd || openbsd
22

33
package sockets
44

sockets/unix_socket_other.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//go:build !linux && !darwin && !dragonfly && !freebsd && !netbsd && !openbsd && !windows
2+
3+
package sockets
4+
5+
import "syscall"
6+
7+
func maxListenerBacklog() int {
8+
return syscall.SOMAXCONN
9+
}

0 commit comments

Comments
 (0)