From 99f78340afaebc294e5c69e710ddf3ca00163987 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 11 Sep 2011 23:54:32 +0000 Subject: [PATCH] Use %u for process group on Sun OS. --- osdep-sunos.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/osdep-sunos.c b/osdep-sunos.c index 24f7baf5..5d1e582e 100644 --- a/osdep-sunos.c +++ b/osdep-sunos.c @@ -41,14 +41,13 @@ osdep_get_name(int fd, char *tty) if ((f = open(tty, O_RDONLY)) < 0) return (NULL); - if ((fstat(f, &st) != 0) || - (ioctl(f, TIOCGPGRP, &pgrp) != 0)) { + if (fstat(f, &st) != 0 || ioctl(f, TIOCGPGRP, &pgrp) != 0) { close(f); return (NULL); } close(f); - xasprintf(&path, "/proc/%hu/psinfo", pgrp); + xasprintf(&path, "/proc/%u/psinfo", (u_int) pgrp); f = open(path, O_RDONLY); xfree(path); if (f < 0)