Bug 140 - <sys/sysctl.h> and <sys/sysinfo.h> incompatibility
Summary: <sys/sysctl.h> and <sys/sysinfo.h> incompatibility
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.3.2
: P2 normal
Target Milestone: ---
Assignee: GOTO Masanori
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-29 14:17 UTC by Rajeev V. Pillai
Modified: 2019-04-10 11:59 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rajeev V. Pillai 2004-04-29 14:17:33 UTC
One cannot #include <sys/sysctl.h> before <sys/sysinfo.h> on
Linux because <sys/sysctl.h> in glibc-2.3.2 #defines _LINUX_KERNEL_H
which causes the inclusion of <sys/sysinfo.h> to be skipped.
The following program demonstrates:

#include <sys/sysctl.h>
#include <sys/sysinfo.h>

int
main(int argc, char* argv[])
{
        struct sysinfo si;

        sysinfo(&si);

        return 0;
}
}
Comment 1 Jakub Jelinek 2004-04-30 08:54:53 UTC
Fix commited to glibc CVS on 2004-04-29.