OpenSSH broken on HP-UX 10.x and fix

Larkin Nickle me at
Fri Nov 5 13:33:58 AEDT 2021

OpenSSH is broken on HP-UX 10.x as the libc has an undocumented 
`getline` which is detected by configure, openbsd-compat's `getline` 
ends up not being used. This causes a segfault as soon as you try to do 
anything useful with the built binaries.

I think it could be worked around with something like this (after taking 
getline out of the long list of functions to check) in, but 
consider this as pseudocode as I don't know much about actually writing 
m4/for autoconf:

if [ `uname` = "HP-UX" ]; then
	case `uname -r` in
			# However you explicitly define that we don't have getline.

With this resolved, OpenSSH compiles and works perfectly (tested with 
GCC 4.2.4 on 10.20).

$ nc 22
$ ssh uname -a
HP-UX alouette B.10.20 U 9000/777 2014502315 unlimited-user license

More information about the openssh-unix-dev mailing list