[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxc: Fix xc_pm.c build by avoiding bogus header includes.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1228994367 0 # Node ID 147c646a28361b19326fc90de79dbbcb7ab83613 # Parent 1419a73316e1d75d3e5d7c1530ac6ae7e7bc7fb4 libxc: Fix xc_pm.c build by avoiding bogus header includes. Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx> --- tools/libxc/xc_pm.c | 8 +++----- tools/libxc/xc_private.h | 3 +++ 2 files changed, 6 insertions(+), 5 deletions(-) diff -r 1419a73316e1 -r 147c646a2836 tools/libxc/xc_pm.c --- a/tools/libxc/xc_pm.c Thu Dec 11 11:19:01 2008 +0000 +++ b/tools/libxc/xc_pm.c Thu Dec 11 11:19:27 2008 +0000 @@ -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, i 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 -r 1419a73316e1 -r 147c646a2836 tools/libxc/xc_private.h --- a/tools/libxc/xc_private.h Thu Dec 11 11:19:01 2008 +0000 +++ b/tools/libxc/xc_private.h Thu Dec 11 11:19:27 2008 +0000 @@ -42,6 +42,9 @@ #define DEBUG 1 #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 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |