diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2011-09-11 23:54:32 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2011-09-11 23:54:32 +0000 |
commit | 99f78340afaebc294e5c69e710ddf3ca00163987 (patch) | |
tree | 0052a329220a7f43ad76f32bedf862c94f4015d3 /osdep-sunos.c | |
parent | 4a01da19df3d3d0c0628856700e32c9e0bb47760 (diff) |
Use %u for process group on Sun OS.
Diffstat (limited to 'osdep-sunos.c')
-rw-r--r-- | osdep-sunos.c | 5 |
1 files 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) |