diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-12-11 11:19:27 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-12-11 11:19:27 +0000 |
commit | de8ffdf6a4c4ffeca977836c9a25d11a2a23247f (patch) | |
tree | e3eb6dc3eaf4cc0c54d799243acb4000e6bd684b /tools | |
parent | c8e857a0aff354ff6404e5f5e237796d98457fb2 (diff) | |
download | xen-de8ffdf6a4c4ffeca977836c9a25d11a2a23247f.tar.gz xen-de8ffdf6a4c4ffeca977836c9a25d11a2a23247f.tar.bz2 xen-de8ffdf6a4c4ffeca977836c9a25d11a2a23247f.zip |
libxc: Fix xc_pm.c build by avoiding bogus header includes.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libxc/xc_pm.c | 8 | ||||
-rw-r--r-- | tools/libxc/xc_private.h | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/tools/libxc/xc_pm.c b/tools/libxc/xc_pm.c index f37cd1d55f..6edb1a210f 100644 --- a/tools/libxc/xc_pm.c +++ b/tools/libxc/xc_pm.c @@ -24,9 +24,7 @@ */ #include <errno.h> -#include <curses.h> -#include <linux/kernel.h> - +#include <stdbool.h> #include "xc_private.h" /* @@ -256,8 +254,8 @@ int xc_get_cpufreq_para(int xc_handle, int cpuid, sys_para->scaling_governor, CPUFREQ_NAME_LEN); /* copy to user_para no matter what cpufreq governor */ - BUILD_BUG_ON(sizeof(((struct xc_get_cpufreq_para *)0)->u) != - sizeof(((struct xen_get_cpufreq_para *)0)->u)); + XC_BUILD_BUG_ON(sizeof(((struct xc_get_cpufreq_para *)0)->u) != + sizeof(((struct xen_get_cpufreq_para *)0)->u)); memcpy(&user_para->u, &sys_para->u, sizeof(sys_para->u)); } diff --git a/tools/libxc/xc_private.h b/tools/libxc/xc_private.h index 6e49b749a0..ef8e3d2f7a 100644 --- a/tools/libxc/xc_private.h +++ b/tools/libxc/xc_private.h @@ -43,6 +43,9 @@ #define INFO 1 #define PROGRESS 0 +/* Force a compilation error if condition is true */ +#define XC_BUILD_BUG_ON(p) ((void)sizeof(struct { int:-!!(p); })) + /* ** Define max dirty page cache to permit during save/restore -- need to balance ** keeping cache usage down with CPU impact of invalidating too often. |