Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Jan 2008 00:09:21 +0100
From:      Pietro Cerutti <gahr@gahr.ch>
To:        freebsd-hackers@freebsd.org
Subject:   more on devstat (missing include)
Message-ID:  <47A103A1.4030108@gahr.ch>

index | next in thread | raw e-mail

[-- Attachment #1 --]
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


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)

iD8DBQFHoQOlwMJqmJVx944RCgjJAJoCm8Wbt9wb73OIsCHmvw0K6p+G4gCg5RGe
tUIcVTVUMh/hyYxXsuTT+a4=
=jG/6
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47A103A1.4030108>