fix: allow to build miniooni for windows (#520)

I need to run test on Windows and I just discovered that:

1. the `errno_unix.go` filename does not mean anything because
`unix` is not a valid platform, so we need a filename for
each platform that we care about;

2. on Windows we need to use WSA prefixed names;

3. `i/e/session_psiphon.go` was not building because of the
migration from `netxlite/iox` to `netxlite`.

This diff attempts to fix all three issues.

The reference issue is https://github.com/ooni/probe/issues/1733,
because I was working on such an issue.
This commit is contained in:
Simone Basso 2021-09-28 18:27:28 +02:00 committed by GitHub
commit 9523753b87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 188 additions and 53 deletions

View file

@ -1,5 +1,5 @@
// Code generated by go generate; DO NOT EDIT.
// Generated: 2021-09-28 12:05:19.918073 +0200 CEST m=+0.154728959
// Generated: 2021-09-28 18:13:54.431042 +0200 CEST m=+0.522721376
package netxlite
@ -16,12 +16,6 @@ func TestClassifySyscallError(t *testing.T) {
}
})
t.Run("for ECANCELED", func(t *testing.T) {
if v := classifySyscallError(ECANCELED); v != FailureOperationCanceled {
t.Fatalf("expected '%s', got '%s'", FailureOperationCanceled, v)
}
})
t.Run("for ECONNREFUSED", func(t *testing.T) {
if v := classifySyscallError(ECONNREFUSED); v != FailureConnectionRefused {
t.Fatalf("expected '%s', got '%s'", FailureConnectionRefused, v)