title: SO_NOSIGPIPE was not declared
body: <p>I am trying to use SO_NOSIGPIPE in a tcp socket.</p>
  
  <pre><code>  int set = 1;
    setsockopt(sockDesc, SOL_SOCKET, SO_NOSIGPIPE, (void *)&amp;set, sizeof(int);
  </code></pre>
  
  <p>but an error is coming:  </p>
  
  <pre><code>   error: SO_NOSIGPIPE was not declared in this scope
  </code></pre>
  
  <p>Is there any header files required, to use that. I have searched over the Internet but didn't get any useful solution.</p>