fix a warning of gethostname(), see
http://stackoverflow.com/questions/3355298/unistd-h-and-c99-on-linux