xscope compilation error

Samuel Thibault samuel.thibault at ens-lyon.org
Sun Jan 4 17:17:40 PST 2009


Rui Tiago Cação Matos, le Mon 05 Jan 2009 01:01:20 +0000, a écrit :
> I got xscope from git://anongit.freedesktop.org/~alanc/xscope but it
> doesn't compile:
> 
> gcc -DHAVE_CONFIG_H -I.    -D_BSD_SOURCE -DHAS_FCHOWN
> -DHAS_STICKY_DIR_BIT   -DUSE_XTRANS -g -O2 -MT scope.o -MD -MP -MF
> .deps/scope.Tpo -c -o scope.o scope.c
> scope.c:73: error: 'MAXHOSTNAMELEN' undeclared here (not in a function)
> 
> I believe that, in Linux, the right thing to do is to #include
> <linux/param.h>

You should rather just #include <sys/param.h>, which doesn't depend on
linuxness.  That being said, the code should rather be rewriten into not
using MAXHOSTNAMELEN unconditionally, since some systems do not have
such arbitrary limitation.

Samuel



More information about the xorg mailing list