[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sysvinit] New code fail on Hurd
From: |
Dr. Werner Fink |
Subject: |
Re: [sysvinit] New code fail on Hurd |
Date: |
Wed, 28 Apr 2010 09:16:56 +0200 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Wed, Apr 28, 2010 at 07:23:49AM +0200, Petter Reinholdtsen wrote:
> The new code fail to build on Debian/Hurd. The complete build log is
> available from
> <URL:https://buildd.debian.org/fetch.cgi?pkg=sysvinit&arch=hurd-i386&ver=2.88dsf-2&stamp=1272429666&file=log&as=raw>,
> and the relevant part is:
>
> cc -g -O2 -W -Wall -D_GNU_SOURCE -DACCTON_OFF killall5.c -o killall5
> killall5.c: In function 'check4nfs':
> killall5.c:374: error: 'PATH_MAX' undeclared (first use in this function)
> killall5.c:374: error: (Each undeclared identifier is reported only once
> killall5.c:374: error: for each function it appears in.)
> killall5.c:374: warning: unused variable 'buf'
> killall5.c: In function 'readproc':
> killall5.c:457: error: 'PATH_MAX' undeclared (first use in this function)
> killall5.c:458: warning: unused variable 'buf'
> killall5.c:457: warning: unused variable 'path'
> killall5.c: In function 'pidof':
> killall5.c:690: error: 'PATH_MAX' undeclared (first use in this function)
> killall5.c:746: warning: left-hand operand of comma expression has no effect
> killall5.c:746: warning: left-hand operand of comma expression has no effect
> killall5.c:738: warning: unused variable 'path'
> killall5.c:737: warning: unused variable 'exe'
> killall5.c:690: warning: unused variable 'real'
>
> Werner, any preferences on how to fix this?
Maybe a line like this
#include <limits.h>
may solve the problem, after this we could use
#ifndef PATH_MAX
# ifdef MAXPATHLEN
# define PATH_MAX MAXPATHLEN
# else
# define PATH_MAX 2048
# endif
#endif
that should work on all systems out there.
Please try out the attached patch.
Werner
--
"Having a smoking section in a restaurant is like having
a peeing section in a swimming pool." -- Edward Burr
killall5.diff
Description: Text Data