From 4abf3bf24cd795098efdc8b9979e8df6945ef463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Groenvall?= Date: Fri, 15 Oct 1999 15:05:25 +0000 Subject: [PATCH] SVR4 don't have major and minor but a new interface. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7145 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/ftp/ftpd/ls.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/appl/ftp/ftpd/ls.c b/appl/ftp/ftpd/ls.c index 4c061a206..17e945c16 100644 --- a/appl/ftp/ftpd/ls.c +++ b/appl/ftp/ftpd/ls.c @@ -143,8 +143,14 @@ make_fileinfo(const char *filename, struct fileinfo *file, int flags) } if(S_ISCHR(st->st_mode) || S_ISBLK(st->st_mode)) { +#if defined(major) && defined(minor) asprintf(&file->major, "%u", (unsigned)major(st->st_rdev)); asprintf(&file->minor, "%u", (unsigned)minor(st->st_rdev)); +#else + /* Don't want to use the DDI/DKI crap. */ + asprintf(&file->major, "%u", (unsigned)st->st_rdev); + asprintf(&file->minor, "%u", 0); +#endif } else asprintf(&file->size, "%lu", (unsigned long)st->st_size);