Bug#714604: libc6-dev: RUSAGE_THREAD constant not exported
Package: libc6-dev
Version: 2.13-38
Severity: normal
Hi,
When including sys/time.h and sys/resource.h as the getrusage manpage says,
RUSAGE_THREAD is not defined.
For example, the following code fails to compile:
#include <sys/time.h>
#include <sys/resource.h>
int main()
{
struct rusage usage;
int r;
r = getrusage(RUSAGE_THREAD, &usage);
r = getrusage(RUSAGE_SELF, &usage);
return 0;
}
with:
error: ‘RUSAGE_THREAD’ undeclared (first use in this function)
Doing a grep in /usr/include it seems it should be defined to 1 and now I'm using:
#ifndef RUSAGE_THREAD
#define RUSAGE_THREAD 1
#endif
as a workaround.
I'm not sure if this is the package I should report it, but as far as I checked
it seems that with these headers it should be defined (instead of a bug in the
manpage or something else). Sorry if I'm wrong :-S
Also, if you want me to try something, just let me know!
Thanks a lot,
Rodrigo
-- System Information:
Debian Release: 7.1
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.8-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libc6-dev depends on:
ii libc-dev-bin 2.13-38
ii libc6 2.13-38
ii linux-libc-dev 3.2.46-1
Versions of packages libc6-dev recommends:
ii gcc [c-compiler] 4:4.7.2-1
ii gcc-4.4 [c-compiler] 4.4.7-2
ii gcc-4.5 [c-compiler] 4.5.3-12
ii gcc-4.6 [c-compiler] 4.6.3-14
ii gcc-4.7 [c-compiler] 4.7.2-5
Versions of packages libc6-dev suggests:
pn glibc-doc <none>
ii manpages-dev 3.44-1
-- no debconf information
Reply to: