Are you sure that it provides  the portable implementation of getting a hostname? http://stackoverflow.com/questions/5773281/compilation-fails-due-to-missing-file-sys-utsname-h As stated here, this header does not exist on Windows.