Add linux compatibility
Resolve minor Linux compatibility issues. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
parent
7b89a54996
commit
054bc00b4c
|
@ -160,18 +160,22 @@ print_what(FILE *fp, mode_t what)
|
||||||
case S_IFDIR:
|
case S_IFDIR:
|
||||||
symbol = '/';
|
symbol = '/';
|
||||||
break;
|
break;
|
||||||
|
#ifdef S_IFDOOR
|
||||||
case S_IFDOOR:
|
case S_IFDOOR:
|
||||||
symbol = '>';
|
symbol = '>';
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case S_IFIFO:
|
case S_IFIFO:
|
||||||
symbol = '|';
|
symbol = '|';
|
||||||
break;
|
break;
|
||||||
case S_IFLNK:
|
case S_IFLNK:
|
||||||
symbol = '@';
|
symbol = '@';
|
||||||
break;
|
break;
|
||||||
|
#ifdef S_IFPORT
|
||||||
case S_IFPORT:
|
case S_IFPORT:
|
||||||
symbol = 'P';
|
symbol = 'P';
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case S_IFSOCK:
|
case S_IFSOCK:
|
||||||
symbol = '=';
|
symbol = '=';
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -149,9 +149,12 @@ extern "C" {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Convert mode bits (zp_mode) to BSD-style DT_* values for storing in
|
* Convert mode bits (zp_mode) to BSD-style DT_* values for storing in
|
||||||
* the directory entries.
|
* the directory entries. On Linux systems this value is already
|
||||||
|
* defined correctly as part of the /usr/include/dirent.h header file.
|
||||||
*/
|
*/
|
||||||
|
#ifndef IFTODT
|
||||||
#define IFTODT(mode) (((mode) & S_IFMT) >> 12)
|
#define IFTODT(mode) (((mode) & S_IFMT) >> 12)
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The directory entry has the type (currently unused on Solaris) in the
|
* The directory entry has the type (currently unused on Solaris) in the
|
||||||
|
|
Loading…
Reference in New Issue