From 7ca5dc4232b9ac5ee5cd25c8b5b33a58904cd251 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 2 Mar 2016 11:52:38 -0600 Subject: For years the man pages have said to #include to get major/minor/makedev, but glibc has vowed to break existing programs (https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html) and replace it with _another_ non-standard header (not in posix or lsb), so let's just add functions to lib/ that do the transform ourselves. --- toys/posix/ps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/posix/ps.c') diff --git a/toys/posix/ps.c b/toys/posix/ps.c index d2ef9fc1..26b4a4ea 100644 --- a/toys/posix/ps.c +++ b/toys/posix/ps.c @@ -701,7 +701,7 @@ static int get_ps(struct dirtree *new) // Couldn't find it, try all the tty drivers. if (i == 3) { FILE *fp = fopen("/proc/tty/drivers", "r"); - int tty_major = 0, maj = major(rdev), min = minor(rdev); + int tty_major = 0, maj = dev_major(rdev), min = dev_minor(rdev); if (fp) { while (fscanf(fp, "%*s %256s %d %*s %*s", buf, &tty_major) == 2) { -- cgit v1.2.3