diff options
author | kaf24@localhost.localdomain <kaf24@localhost.localdomain> | 2006-12-29 16:17:53 +0000 |
---|---|---|
committer | kaf24@localhost.localdomain <kaf24@localhost.localdomain> | 2006-12-29 16:17:53 +0000 |
commit | cc56b92850c76f8adb4c7da642294bec619eebc6 (patch) | |
tree | 2b0570742d514ba7b79b984901b488bde93d05f3 /tools/xenstat | |
parent | 75264891914bb7cd767641c63c124d2229db6b06 (diff) | |
download | xen-cc56b92850c76f8adb4c7da642294bec619eebc6.tar.gz xen-cc56b92850c76f8adb4c7da642294bec619eebc6.tar.bz2 xen-cc56b92850c76f8adb4c7da642294bec619eebc6.zip |
[SOLARIS] Fix xentop build.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools/xenstat')
-rw-r--r-- | tools/xenstat/xentop/Makefile | 1 | ||||
-rw-r--r-- | tools/xenstat/xentop/xentop.c | 11 |
2 files changed, 10 insertions, 2 deletions
diff --git a/tools/xenstat/xentop/Makefile b/tools/xenstat/xentop/Makefile index 2248bfb3c3..5f85d732e6 100644 --- a/tools/xenstat/xentop/Makefile +++ b/tools/xenstat/xentop/Makefile @@ -26,6 +26,7 @@ sbindir=$(prefix)/sbin 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 --git a/tools/xenstat/xentop/xentop.c b/tools/xenstat/xentop/xentop.c index a2ea23a735..4b610c3668 100644 --- a/tools/xenstat/xentop/xentop.c +++ b/tools/xenstat/xentop/xentop.c @@ -49,6 +49,13 @@ #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 print(const char *fmt, ...) static void attr_addstr(int attr, const char *str) { attron(attr); - addstr(str); + addstr((curses_str_t)str); attroff(attr); } |