added unistd.h for gethostname error