summaryrefslogtreecommitdiffstats
path: root/src/fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs.c')
-rw-r--r--src/fs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/fs.c b/src/fs.c
index 182a217..2a63302 100644
--- a/src/fs.c
+++ b/src/fs.c
@@ -83,7 +83,13 @@ static char *rccCreateFullName(const char *path, const char *filename) {
static int rccIsFile(const char *filename) {
struct stat st;
+#ifdef HAVE_SYS_STAT_H
+# ifdef S_ISREG
if ((!stat(filename,&st))&&(S_ISREG(st.st_mode))) return 1;
+# else /* S_ISREG */
+ if (!stat(filename,&st)) return 1;
+# endif /* S_ISREG */
+#endif /* HAVE_SYS_STAT_H */
return 0;
}