[Pkg-pciutils-discuss] Bug#380032: FTBFS on hurd-i386: Unconditional use of MAXPATHLEN

Cyril Brulebois cyril.brulebois at enst-bretagne.fr
Thu Jul 27 00:14:28 UTC 2006


Package: pciutils
Severity: important
Tags: patch

Hi,

when trying to build your package, I've got the following error:
> cc -O2 -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes
>   -Winline   -c -o pcimodules.o pcimodules.c
> pcimodules.c:62: warning: no previous prototype for 'read_pcimap'
> pcimodules.c: In function 'read_pcimap':
> pcimodules.c:64: error: 'MAXPATHLEN' undeclared (first use in this function)
> pcimodules.c:64: error: (Each undeclared identifier is reported only once
> pcimodules.c:64: error: for each function it appears in.)
> pcimodules.c:64: warning: unused variable 'filename'
> make[1]: *** [pcimodules.o] Error 1
> make[1]: Leaving directory `/home/kibi/pciutils-build/pciutils-2.2.1'
> make: *** [build-pciutils] Error 2


As briefly explained on the hurd-devel-debian page[1], unconditional use
of PATH_MAX is a POSIX incompatibility. I uploaded some fixes on
alioth[2] to fix that problem.

 1. http://www.debian.org/ports/hurd/hurd-devel-debian
 2. http://alioth.debian.org/tracker/index.php?func=detail&aid=303688&group_id=30628&atid=410472


A quick summary of what you'll found there:
 - a workaround (ifndef/define) if you don't like any of the proper fixes;
 - a standard fix;
 - a better fix (with snprintf instead of sprintf);
 - a "upstream spirit" fix (without snprintf and without check on malloc, as
   done by upstream in the rest of the source).


Cheers,

-- 
Cyril Brulebois




More information about the Pkg-pciutils-discuss mailing list