title: setsockopt returns errno=2
body: <p>Im creating an UDP  socket (centos 6), which i want to send broadcast message. Everything works, creating socket works - socket(..) returns value=25, but: </p>
  
  <pre><code>int val = 1;
        if (setsockopt(a, SOL_SOCKET, SO_BROADCAST, &amp;val, sizeof(val)) &lt; 1){
            debug("setsockoopt failed with errno: %d, socket %d", errno, a);
        }
  </code></pre>
  
  <p>setsockopt sets errno to value = 2. Communictaion works, im sending udp packet to x.x.x.255 host, and all my apps recives it, but im wondering from where that errno came (errno=2=no such file or directory)</p>
  
  <p>best regards</p>