OpenSSH 3.9p1 does not compile on HP-UX 10.20 due to the code which was added in includes.h to work around HP-UX 11.11's behavior. The following patch lets it work on HP-UX 10.20. It should also work on HP-UX 11.11, but I can't test that (no HP-UX 11 boxes here). It uses code from http://www.faqs.org/faqs/hp/hpux-faq/section-213.html . The copyright at http://www.faqs.org/faqs/hp/hpux-faq/ is decidedly not free, but I'm hoping the copyright holder will permit the code to be used freely. I've CC'ed him on this mail. --- includes.h.orig Fri Sep 17 10:03:08 2004 +++ includes.h Fri Sep 17 09:52:03 2004 @@ -186,8 +186,20 @@ * of getspnam when _INCLUDE__STDC__ is defined, so we unset it here. */ #ifdef __hpux -# ifdef _INCLUDE__STDC__ -# undef _INCLUDE__STDC__ +# include <sys/privgrp.h> +# if defined(PRIV_PSET) +# define _hpux_11i +# elif defined(PRIV_SPUCTL) +# define __hpux_11x +# elif defined(PRIV_SERIALIZE) +# define __hpux_10x +# elif defined(PRIV_SETRUGID) +# define __hpux_9x +# endif +# if defined(_hpux_11i) || defined(__hpux_11x) +# ifdef _INCLUDE__STDC__ +# undef _INCLUDE__STDC__ +# endif # endif #endif
Greg Wooledge wrote:> OpenSSH 3.9p1 does not compile on HP-UX 10.20 due to the code which was > added in includes.h to work around HP-UX 11.11's behavior. The following > patch lets it work on HP-UX 10.20. It should also work on HP-UX 11.11, > but I can't test that (no HP-UX 11 boxes here).This is what is in my tree at the moment (attached). -d -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hpux.diff Url: http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20040921/91da5f94/attachment-0001.ksh
On Tue, Sep 21, 2004 at 09:38:05AM +1000, Damien Miller wrote:> This is what is in my tree at the moment (attached).Works for me. HP-UX 10.20 with gcc 3.2.2.> Index: includes.h > ==================================================================> RCS file: /var/cvs/openssh/includes.h,v > retrieving revision 1.72 > diff -u -r1.72 includes.h > --- includes.h 14 Aug 2004 14:01:48 -0000 1.72 > +++ includes.h 20 Sep 2004 23:33:23 -0000 > @@ -185,7 +185,7 @@ > * On HP-UX 11.11, shadow.h and prot.h provide conflicting declarations > * of getspnam when _INCLUDE__STDC__ is defined, so we unset it here. > */ > -#ifdef __hpux > +#if defined(__hpux) && defined(HAVE_SECUREWARE) > # ifdef _INCLUDE__STDC__ > # undef _INCLUDE__STDC__ > # endif