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
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user