OpenSSH 2.1.1p2 - compiling on AIX

Niklas Edmundsson nikke at
Sun Jul 9 01:13:36 EST 2000

When compiling OpenSSH 2.1.1p2 on AIX 4.3.2 using the IBM compiler
(ibmcxx 3.6.4) in Ansi-C mode by using the xlc binary instead of cc
the compilation fails due to the fact that the OpenSSH code mixes k&r
style functions with ANSI prototypes: 

"bsd-rresvport.c", line 56.1: 1506-343 (S) Redeclaration of rresvport_af differs from previous declaration on line 7 of "bsd-rresvport.h".
"bsd-rresvport.c", line 56.1: 1506-379 (I) Prototype for function rresvport_af must contain only promoted types if prototype and nonprototype declarations are mixed.
"bsd-rresvport.c", line 56.1: 1506-380 (I) Parameter 2 has type "unsigned char" which promotes to "int".

One way to fix this is to rewrite all functions to ANSI style, which I
guess is not an option.

Another way to "fix" it is to tell xlc to behave more like cc by
setting the compiler flag -qlanglvl=extended, which I feel should be
done by configure when it detects AIX using the xlc compiler. 

 Niklas Edmundsson, Admin @ {acc,hpc2n,ing}    |   nikke at
 I never did it that way before.

More information about the openssh-unix-dev mailing list