summaryrefslogtreecommitdiffstats
path: root/src/util/support
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/support')
-rw-r--r--src/util/support/mkstemp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/util/support/mkstemp.c b/src/util/support/mkstemp.c
index b671c6b56..b68aa4dbd 100644
--- a/src/util/support/mkstemp.c
+++ b/src/util/support/mkstemp.c
@@ -51,6 +51,16 @@ static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93";
#define O_BINARY 0
#endif
+#if !defined S_ISDIR
+#if defined S_IFMT
+#define S_ISDIR(MODE) (((MODE) & S_IFMT) == S_IFDIR)
+#elif defined _S_IFMT
+#define S_ISDIR(MODE) (((MODE) & _S_IFMT) == _S_IFDIR)
+#else
+/* Hope that there's a S_ISDIR function defined. */
+#endif
+#endif
+
static int _gettemp(char *, int *);
int mkstemp(path)