title: Syscall Constant syscall.ENONET Undefined in Go
body: <p>I tried to run the following bar.go script</p>
  
  <pre><code>package main
  
  import (
      "fmt"
      "syscall"
  )
  
  func main() {
      fmt.Printf("%d\n", uintptr(syscall.ENONET))
  }
  </code></pre>
  
  <p>by calling <code>go run bar.go</code> and get this error:</p>
  
  <pre><code># command-line-arguments
  ./bar.go:9:29: undefined: syscall.ENONET
  </code></pre>
  
  <p>I am using Mac and go version <code>1.14.3 darwin/amd64</code>. I tried to run this exact script on Go playground, <a href="https://play.golang.org/p/ecMZPsGgGOa" rel="nofollow noreferrer">https://play.golang.org/p/ecMZPsGgGOa</a> and it worked.</p>
  
  <p>I tried to run the script using <code>CGO_ENABLED=1 GOOS=linux GOARCH=amd64</code> and got this error instead:</p>
  
  <pre><code>fork/exec /var/folders/2l/dj6ph5t92y17vhtv3n6xzr5r0000gn/T/go-build847134732/b001/exe/bar: exec format error
  </code></pre>
  
  <p>How do I get <code>syscall.ENONET</code> to work on Mac?</p>
  
  <p>Thank you</p>