github.com/wasilibs/wazerox@v0.0.0-20240124024944-4923be63ab5f/experimental/sys/syscall_errno_notwindows.go (about)

     1  //go:build !windows
     2  
     3  package sys
     4  
     5  func errorToErrno(err error) Errno {
     6  	if errno, ok := err.(Errno); ok {
     7  		return errno
     8  	}
     9  	if errno, ok := syscallToErrno(err); ok {
    10  		return errno
    11  	}
    12  	return EIO
    13  }