more on devstat (missing include)

Pietro Cerutti gahr at gahr.ch
Wed Jan 30 15:09:33 PST 2008


Hi hackers,

I think that i) sys/devicestat.h should include sys/resource.h or ii)
the man page of devstat(9) should mention that the user himself is
supposed to include sys/resource.h.

Without:

> cat devstat.c
#include <devstat.h>

int main(void)
{
   devstat_getnumdevs(NULL);
   return (0);
}
> gcc -ldevstat -o devstat devstat.c
In file included from devstat.c:1:
/usr/include/devstat.h:131: error: 'CPUSTATES' undeclared here (not in a
function)
Exit 1


I can provide a patch if someone could tell me which one of the proposed
solutions above is the preferred one.

Thanks,

-- 
Pietro Cerutti

PGP Public Key:
http://gahr.ch/pgp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20080130/33ee593e/signature.pgp


More information about the freebsd-hackers mailing list