diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-10-17 18:15:59 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-10-17 18:15:59 +0100 |
commit | 2d0b60a90f4ac8907de22efa11bdef96b6783a94 (patch) | |
tree | 2d3259d4d84ba02af67cd2cb191b2c623b6050f8 /tools/console | |
parent | cf1aa17df0aa162fa0004bd99a6b2d36b1fb27cf (diff) | |
download | xen-2d0b60a90f4ac8907de22efa11bdef96b6783a94.tar.gz xen-2d0b60a90f4ac8907de22efa11bdef96b6783a94.tar.bz2 xen-2d0b60a90f4ac8907de22efa11bdef96b6783a94.zip |
[SOLARIS] A couple of simple compile fixes for tools/ on Solaris.
Signed-off-by: John Levon <john.levon@sun.com>
Diffstat (limited to 'tools/console')
-rw-r--r-- | tools/console/daemon/io.c | 2 | ||||
-rw-r--r-- | tools/console/daemon/utils.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c index 8bb18cafab..25ca40372f 100644 --- a/tools/console/daemon/io.c +++ b/tools/console/daemon/io.c @@ -147,7 +147,7 @@ static int domain_create_tty(struct domain *dom) int master; bool success; - if ((master = getpt()) == -1 || + if ((master = open("/dev/ptmx",O_RDWR|O_NOCTTY)) == -1 || grantpt(master) == -1 || unlockpt(master) == -1) { dolog(LOG_ERR, "Failed to create tty for domain-%d", dom->domid); diff --git a/tools/console/daemon/utils.c b/tools/console/daemon/utils.c index 40c64211d2..0801a6ccd6 100644 --- a/tools/console/daemon/utils.c +++ b/tools/console/daemon/utils.c @@ -95,7 +95,7 @@ void daemonize(const char *pidfile) exit(1); } - len = sprintf(buf, "%d\n", getpid()); + len = sprintf(buf, "%ld\n", (long)getpid()); if (write(fd, buf, len) < 0) exit(1); |