Skip to content

Commit

Permalink
Merge pull request #10 from Hades32/windows-compat
Browse files Browse the repository at this point in the history
allow compilation on windows
  • Loading branch information
brutella authored May 20, 2019
2 parents 2fd43cd + 6d2b104 commit 033849e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions constants_windows.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package can

// TODO(brutella) implement
const AF_CAN = -1
10 changes: 10 additions & 0 deletions readwritecloser_windows.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package can

import (
"fmt"
"net"
)

func NewReadWriteCloserForInterface(i *net.Interface) (ReadWriteCloser, error) {
return nil, fmt.Errorf("Binding to can interface no supported on Windows")
}
9 changes: 9 additions & 0 deletions socket_windows.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package can

import "syscall"

// NewSockaddr returns a socket address based on the protocol and interface index.
// TODO(brutella) This method has no implementation.
func NewSockaddr(proto uint16, Ifindex int) syscall.Sockaddr {
return &syscall.SockaddrUnix{}
}

0 comments on commit 033849e

Please sign in to comment.