[dsc] Trying to build dsc...

Dave Swanger swangdb at auburn.edu
Tue Aug 5 19:34:37 UTC 2008

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.

(cd dsc; make all)
make[1]: Entering directory
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
make: *** [all] Error 2

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?

    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;

David Swanger
swangdb at auburn.edu

More information about the dsc mailing list