[dsc] Trying to build dsc...
Duane Wessels
wessels at measurement-factory.com
Tue Aug 5 19:42:28 UTC 2008
On Tue, 5 Aug 2008, Dave Swanger wrote:
> I'm using a Solaris 9 Sparc computer with gcc 3.4.6. When I try to make
> the collector, it compiles a few C files but dies here.
>
> <start>
> make
> (cd dsc; make all)
> make[1]: Entering directory
> `/usr/local/src/dsc-200801301758/collector/dsc'
> gcc -g -Wall -DUSE_IPV6=1 -I ../TmfBase/Hapy/src/include -g -Wall
> -DUSE_IPV6=1 -I ../TmfBase/Hapy/src/include -c -o daemon.o daemon.c
> daemon.c: In function `write_pid_file':
> daemon.c:86: warning: int format, pid_t arg (arg 3)
> daemon.c: In function `disk_is_full':
> daemon.c:93: error: storage size of 's' isn't known
> daemon.c:95: warning: implicit declaration of function `statfs'
> daemon.c:93: warning: unused variable `s'
> daemon.c: In function `main':
> daemon.c:238: warning: int format, pid_t arg (arg 3)
> daemon.c:241: warning: int format, pid_t arg (arg 3)
> make[1]: *** [daemon.o] Error 1
> make[1]: Leaving directory
> `/usr/local/src/dsc-200801301758/collector/dsc'
> make: *** [all] Error 2
> <end>
>
> The function disk_is_full is listed below. For some reason gcc does
> not like the struct declaration. Is there a simple fix for this?
> Thanks!
>
>
> int
> disk_is_full(void)
> {
> struct statfs s;
> uint64_t avail_bytes;
> if (statfs(".", &s) < 0)
> return 0; /* assume not */
> avail_bytes = s.f_bsize*s.f_bavail;
> if (avail_bytes < minfree_bytes)
> return 1;
> return 0;
> }
Hi David,
A simple fix would be to change the function in the file to look like this:
int
disk_is_full(void)
{
return 0;
}
This will allow you to get DSC compiled although this feature will be disabled
until we can work out a better solution.
DW
More information about the dsc
mailing list