[9.18] Merge branch 'each-cleanup-gethostname' into 'main'
this function was just a front-end for gethostname(). it was needed when we supported windows, which has a different function for looking up the hostname; it's not needed any longer.
Backport of MR !7555 (merged)
Edited by Evan Hunt