[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-3.0.4-testing] [SOLARIS] Fix xentop build.
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxxx # Date 1167409073 0 # Node ID ab88ed7505e901922a230edfbd5de91044793796 # Parent 2ec0bc1f51e01b6285b4f713bd0af5b8ef057511 [SOLARIS] Fix xentop build. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> Based on xen-unstable changeset 13189:f0e9c518d0ff27cc3b505e4ba1d6dc9d47b7bd2c --- tools/xenstat/xentop/Makefile | 1 + tools/xenstat/xentop/xentop.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff -r 2ec0bc1f51e0 -r ab88ed7505e9 tools/xenstat/xentop/Makefile --- a/tools/xenstat/xentop/Makefile Fri Dec 29 13:02:19 2006 +0000 +++ b/tools/xenstat/xentop/Makefile Fri Dec 29 16:17:53 2006 +0000 @@ -26,6 +26,7 @@ CFLAGS += -DGCC_PRINTF -Wall -Werror -I$ CFLAGS += -DGCC_PRINTF -Wall -Werror -I$(XEN_LIBXENSTAT) LDFLAGS += -L$(XEN_LIBXENSTAT) LDLIBS += -lxenstat $(CURSES_LIBS) $(SOCKET_LIBS) +CFLAGS += -DHOST_$(XEN_OS) .PHONY: all all: xentop diff -r 2ec0bc1f51e0 -r ab88ed7505e9 tools/xenstat/xentop/xentop.c --- a/tools/xenstat/xentop/xentop.c Fri Dec 29 13:02:19 2006 +0000 +++ b/tools/xenstat/xentop/xentop.c Fri Dec 29 16:17:53 2006 +0000 @@ -48,6 +48,13 @@ #endif #define KEY_ESCAPE '\x1B' + +#ifdef HOST_SunOS +/* Old curses library on Solaris takes non-const strings. */ +#define curses_str_t char * +#else +#define curses_str_t const char * +#endif /* * Function prototypes @@ -269,7 +276,7 @@ static void print(const char *fmt, ...) if (!batch) { if((current_row() < lines()-1)) { va_start(args, fmt); - vwprintw(stdscr, fmt, args); + vwprintw(stdscr, (curses_str_t)fmt, args); va_end(args); } } else { @@ -283,7 +290,7 @@ static void attr_addstr(int attr, const static void attr_addstr(int attr, const char *str) { attron(attr); - addstr(str); + addstr((curses_str_t)str); attroff(attr); } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |