WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] libxc: Fix xc_pm.c build by avoiding bogu

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxc: Fix xc_pm.c build by avoiding bogus header includes.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 16 Dec 2008 22:30:28 -0800
Delivery-date: Tue, 16 Dec 2008 22:31:03 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxc: Fix xc_pm.c build by avoiding bogus header includes., Xen patchbot-unstable <=