From b422126a9f85ea5db78f94af33944c1fc2d7688b Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sun, 9 Feb 1997 23:58:45 +0000 Subject: Updates file(1) to version 3.22 by way to NetBSD. --- usr.bin/file/fsmagic.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'usr.bin/file/fsmagic.c') diff --git a/usr.bin/file/fsmagic.c b/usr.bin/file/fsmagic.c index 33cd2dbfcb5..f5ba6ee0b4e 100644 --- a/usr.bin/file/fsmagic.c +++ b/usr.bin/file/fsmagic.c @@ -1,4 +1,5 @@ -/* $OpenBSD: fsmagic.c,v 1.2 1996/06/26 05:32:57 deraadt Exp $ */ +/* $OpenBSD: fsmagic.c,v 1.3 1997/02/09 23:58:24 millert Exp $ */ + /* * fsmagic - magic based on filesystem info - directory, special files, etc. * @@ -32,6 +33,11 @@ #include #include #include +#ifndef major +# if defined(__SVR4) || defined(_SVR4_SOURCE) +# include +# endif +#endif #ifndef major /* if `major' not defined in types.h, */ #include /* try this one. */ #endif @@ -46,7 +52,7 @@ #include "file.h" #ifndef lint -static char *moduleid = "$OpenBSD: fsmagic.c,v 1.2 1996/06/26 05:32:57 deraadt Exp $"; +static char *moduleid = "$OpenBSD: fsmagic.c,v 1.3 1997/02/09 23:58:24 millert Exp $"; #endif /* lint */ int @@ -84,12 +90,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 -- cgit v1.2.3