remove some warning, move gethostname to os_calls