Comment 10 for bug 735072

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 735072] Re: The hostname proposed by installer is too long for file sharing to work correctly.

On Mon, 2011-04-25 at 17:02 +0000, Johan Fornander wrote:
> The source code in the official samba git (source/lib/util.c) seems to
> use HOST_NAME_MAX and I found an inconsistency in the code base:
>
> source/lib/replace/replace.h:
> 384 #ifndef HOST_NAME_MAX
> 385 #define HOST_NAME_MAX 255
>
> source/lib/replace/system/network.h
> 269 #ifndef HOST_NAME_MAX
> 270 #define HOST_NAME_MAX 256
>
> Which one is used?
Neither would/should be used as the Linux system headers already define
HOST_NAME_MAX. These defines are only for platforms that don't have
HOST_NAME_MAX.

Cheers,

Jelmer