Skip to content

Commit

Permalink
Add linux compatibility
Browse files Browse the repository at this point in the history
Resolve minor Linux compatibility issues.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
  • Loading branch information
behlendorf committed Aug 31, 2010
1 parent 7b89a54 commit 054bc00
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/libzfs/libzfs_diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,18 +160,22 @@ print_what(FILE *fp, mode_t what)
case S_IFDIR:
symbol = '/';
break;
#ifdef S_IFDOOR
case S_IFDOOR:
symbol = '>';
break;
#endif
case S_IFIFO:
symbol = '|';
break;
case S_IFLNK:
symbol = '@';
break;
#ifdef S_IFPORT
case S_IFPORT:
symbol = 'P';
break;
#endif
case S_IFSOCK:
symbol = '=';
break;
Expand Down
5 changes: 4 additions & 1 deletion module/zfs/include/sys/zfs_znode.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,12 @@ extern "C" {

/*
* 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)
#endif

/*
* The directory entry has the type (currently unused on Solaris) in the
Expand Down

0 comments on commit 054bc00

Please sign in to comment.