Fix hostname length issue

The length of the hostname in some platforms can be larger than 255 bytes.
And I don't want to include those header files which define the max hostname length in current platform,so simply define a new MACRO to finish this job.