Bug 5142 - MAXHOSTNAMELEN undefined - build failure on Tru64 (missing #include)
: MAXHOSTNAMELEN undefined - build failure on Tru64 (missing #include)
Status: RESOLVED FIXED
: GSI-OpenSSH
GSI-OpenSSH
: 4.0.3
: HP OSF/1
: P3 normal
: ---
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2007-03-22 15:31 by
Modified: 2007-05-02 21:12 (History)


Attachments
In "canohost.c", include <sys/param.h> for Tru64 Unix (384 bytes, patch)
2007-03-22 15:31, Jeff Forys
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2007-03-22 15:31:07
The file "gsi_openssh-3.9-src/canohost.c" references MAXHOSTNAMELEN, which is
usually #define'd in <sys/param.h>.  Since <sys/param.h> is not explicitly
included by "canohost.c", it's been left up to one of the other #include
directives to pull it in.

However, this does not happen on Tru64 causing a build failure:

> cc: Error: canohost.c, line 434:
>    In the declaration of "buf", "MAXHOSTNAMELEN" is not declared.
>           char buf[MAXHOSTNAMELEN];

The fix is to include <sys/param.h> (after <sys/types.h>) on Tru64 Unix.  I'm
including a patch to do this; feel free to remove the #ifdef/#endif if you want
to make this change common across all platforms.

Jeff
------- Comment #1 From 2007-03-22 15:31:51 -------
Created an attachment (id=1217) [details]
In "canohost.c", include <sys/param.h> for Tru64 Unix
------- Comment #2 From 2007-03-26 09:34:59 -------
Thanks for the report and the patch.  The #include <sys/param.h> will be
included in future releases.
------- Comment #3 From 2007-05-02 21:12:46 -------
Fix included in gsi_openssh-4.0, released today.