summaryrefslogtreecommitdiffstats
path: root/usr.bin/file/fsmagic.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/file/fsmagic.c')
-rw-r--r--usr.bin/file/fsmagic.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/usr.bin/file/fsmagic.c b/usr.bin/file/fsmagic.c
index a46bf46..056d3ea 100644
--- a/usr.bin/file/fsmagic.c
+++ b/usr.bin/file/fsmagic.c
@@ -31,6 +31,11 @@
#include <sys/stat.h>
#include <unistd.h>
#include <stdlib.h>
+#ifndef major
+# if defined(__SVR4) || defined(_SVR4_SOURCE)
+# include <sys/mkdev.h>
+# endif
+#endif
#ifndef major /* if `major' not defined in types.h, */
#include <sys/sysmacros.h> /* try this one. */
#endif
@@ -45,8 +50,8 @@
#include "file.h"
#ifndef lint
-static char *moduleid =
- "@(#)$Id$";
+static char *moduleid =
+ "@(#)$Id: fsmagic.c,v 1.1.1.3 1997/03/18 17:58:44 mpp Exp $";
#endif /* lint */
int
@@ -84,12 +89,12 @@ struct stat *sb;
ckfputs("directory", stdout);
return 1;
case S_IFCHR:
- (void) printf("character special (%d/%d)",
- major(sb->st_rdev), minor(sb->st_rdev));
+ (void) printf("character special (%ld/%ld)",
+ (long) major(sb->st_rdev), (long) minor(sb->st_rdev));
return 1;
case S_IFBLK:
- (void) printf("block special (%d/%d)",
- major(sb->st_rdev), minor(sb->st_rdev));
+ (void) printf("block special (%ld/%ld)",
+ (long) major(sb->st_rdev), (long) minor(sb->st_rdev));
return 1;
/* TODO add code to handle V7 MUX and Blit MUX files */
#ifdef S_IFIFO
OpenPOWER on IntegriCloud