*: work around sysinfo.h versus linux/*.h problems

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2011-07-26 13:42:12 +02:00
parent 4abcb8b0d1
commit 67905e2d7c
5 changed files with 18 additions and 5 deletions

View File

@ -52,10 +52,12 @@
#ifdef HAVE_SYS_STATFS_H
# include <sys/statfs.h>
#endif
/* struct sysinfo is linux-specific */
#ifdef __linux__
# include <sys/sysinfo.h>
#endif
/* Don't do this here:
* #include <sys/sysinfo.h>
* Some linux/ includes pull in conflicting definition
* of struct sysinfo (only in some toolchanins), which breaks build.
* Include sys/sysinfo.h only in those files which need it.
*/
#if ENABLE_SELINUX
# include <selinux/selinux.h>
# include <selinux/context.h>