title: HOST_NAME_MAX undefined after include <limits.h>
body: <p>I don't know why it still says HOST_NAME_MAX is implicit declaration. </p>
  
  <p>Instead, I searched the web and do the following to fix it: </p>
  
  <pre><code>#include &lt;netdb.h&gt;
  </code></pre>
  
  <p>and use <code>MAXHOSTNAMELEN</code> instead of <code>HOST_NAME_MAX</code></p>
  
  <p>however, I am not very sure it this is a good way, and the reasons behind it. </p>