ia64/xen-unstable

changeset 18910:147c646a2836

libxc: Fix xc_pm.c build by avoiding bogus header includes.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Dec 11 11:19:27 2008 +0000 (2008-12-11)
parents 1419a73316e1
children 0f1a166fe92e
files tools/libxc/xc_pm.c tools/libxc/xc_private.h
line diff
     1.1 --- a/tools/libxc/xc_pm.c	Thu Dec 11 11:19:01 2008 +0000
     1.2 +++ b/tools/libxc/xc_pm.c	Thu Dec 11 11:19:27 2008 +0000
     1.3 @@ -24,9 +24,7 @@
     1.4   */
     1.5  
     1.6  #include <errno.h>
     1.7 -#include <curses.h>
     1.8 -#include <linux/kernel.h>
     1.9 -
    1.10 +#include <stdbool.h>
    1.11  #include "xc_private.h"
    1.12  
    1.13  /*
    1.14 @@ -256,8 +254,8 @@ int xc_get_cpufreq_para(int xc_handle, i
    1.15                  sys_para->scaling_governor, CPUFREQ_NAME_LEN);
    1.16  
    1.17          /* copy to user_para no matter what cpufreq governor */
    1.18 -        BUILD_BUG_ON(sizeof(((struct xc_get_cpufreq_para *)0)->u) !=
    1.19 -                     sizeof(((struct xen_get_cpufreq_para *)0)->u));
    1.20 +        XC_BUILD_BUG_ON(sizeof(((struct xc_get_cpufreq_para *)0)->u) !=
    1.21 +                        sizeof(((struct xen_get_cpufreq_para *)0)->u));
    1.22  
    1.23          memcpy(&user_para->u, &sys_para->u, sizeof(sys_para->u));
    1.24      }
     2.1 --- a/tools/libxc/xc_private.h	Thu Dec 11 11:19:01 2008 +0000
     2.2 +++ b/tools/libxc/xc_private.h	Thu Dec 11 11:19:27 2008 +0000
     2.3 @@ -43,6 +43,9 @@
     2.4  #define INFO     1
     2.5  #define PROGRESS 0
     2.6  
     2.7 +/* Force a compilation error if condition is true */
     2.8 +#define XC_BUILD_BUG_ON(p) ((void)sizeof(struct { int:-!!(p); }))
     2.9 +
    2.10  /*
    2.11  ** Define max dirty page cache to permit during save/restore -- need to balance 
    2.12  ** keeping cache usage down with CPU impact of invalidating too often.