Hpux hostname fix 3.5.x

Fix for truncated hostname bug #3517