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>

next in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig307DB583FA6C84EDAE64775F
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

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,

--=20
Pietro Cerutti

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


--------------enig307DB583FA6C84EDAE64775F
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)

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

--------------enig307DB583FA6C84EDAE64775F--



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