about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Src/Modules/stat.c2
-rw-r--r--Src/system.h7
2 files changed, 9 insertions, 0 deletions
diff --git a/Src/Modules/stat.c b/Src/Modules/stat.c
index d8179143e..b6fa702a8 100644
--- a/Src/Modules/stat.c
+++ b/Src/Modules/stat.c
@@ -66,6 +66,8 @@ statmodeprint(mode_t mode, char *outbuf, int flags)
 	    *pm = 'c';
 	else if (S_ISDIR(mode))
 	    *pm = 'd';
+	else if (S_ISDOOR(mode))
+	    *pm = 'D';
 	else if (S_ISFIFO(mode))
 	    *pm = 'p';
 	else if (S_ISLNK(mode))
diff --git a/Src/system.h b/Src/system.h
index a3edf0fc4..dbc387947 100644
--- a/Src/system.h
+++ b/Src/system.h
@@ -409,6 +409,7 @@ struct timezone {
 # undef S_ISBLK
 # undef S_ISCHR
 # undef S_ISDIR
+# undef S_ISDOOR
 # undef S_ISFIFO
 # undef S_ISLNK
 # undef S_ISMPB
@@ -436,6 +437,9 @@ struct timezone {
 #if !defined(S_ISDIR) && defined(S_IFDIR)
 # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
 #endif
+#if !defined(S_ISDOOR) && defined(S_IFDOOR)      /* Solaris */
+# define S_ISDOOR(m) (((m) & S_IFMT) == S_IFDOOR)
+#endif
 #if !defined(S_ISFIFO) && defined(S_IFIFO)
 # define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
 #endif
@@ -475,6 +479,9 @@ struct timezone {
 #ifndef S_ISDIR
 # define S_ISDIR(m) ((void)(m), 0)
 #endif
+#ifndef S_ISDOOR
+# define S_ISDOOR(m) ((void)(m), 0)
+#endif
 #ifndef S_ISFIFO
 # define S_ISFIFO(m) ((void)(m), 0)
 #endif