[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] 13120:3e2d3d737624 breaks Solaris compile



On Fri, Dec 22, 2006 at 02:29:57PM +0000, John Levon wrote:

> Are both unneccessary on Linux (as they're const char * already), and
> broken on Solaris, where we have rather unfortunate prototypes from
> pre-history that aren't constified. I think these need to be reverted
> back to being the meaningful '(char *)'.

The below is still needed.

regards
john


# HG changeset patch
# User john.levon@xxxxxxx
# Date 1167321418 28800
# Node ID a00bf3c8f7bc8cb8537b153c61e6d09c9b494459
# Parent  bce4fd687b7901de6f2e72ea37d92508eb3f5a77
Older curses implementations don't have const-safe prototypes, so we must cast.

Signed-off-by: John Levon <john.levon@xxxxxxx>

diff --git a/tools/xenstat/xentop/xentop.c b/tools/xenstat/xentop/xentop.c
--- a/tools/xenstat/xentop/xentop.c
+++ b/tools/xenstat/xentop/xentop.c
@@ -271,7 +271,7 @@ static void print(const char *fmt, ...)
        if (!batch) {
                if((current_row() < lines()-1)) {
                        va_start(args, fmt);
-                       vwprintw(stdscr, fmt, args);
+                       vwprintw(stdscr, (char *)fmt, args);
                        va_end(args);
                }
        } else {
@@ -285,7 +285,7 @@ static void attr_addstr(int attr, const 
 static void attr_addstr(int attr, const char *str)
 {
        attron(attr);
-       addstr(str);
+       addstr((char *)str);
        attroff(attr);
 }
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.