summaryrefslogtreecommitdiffstats
path: root/src/dir.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2008-06-01 17:29:17 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2008-06-01 17:29:17 +0200
commit5ae8782a4baeae7c0a3a9c92492f092665b0a343 (patch)
treea83a99e19935d108c73e72b3dd758037fb1bf452 /src/dir.c
parentaa353565f6718bac87b6e48368f0fc01f74e1a05 (diff)
Portability fix for system missing S_IRUSR, S_IWUSR, S_IXUSR...
Diffstat (limited to 'src/dir.c')
-rw-r--r--src/dir.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/dir.c b/src/dir.c
index 251931d..af56980 100644
--- a/src/dir.c
+++ b/src/dir.c
@@ -740,15 +740,33 @@ static struct {
unsigned int lmask;
mode_t mask;
} mode_table[] = {
+#ifdef S_IRUSR
{ LINUX_S_IRUSR, S_IRUSR },
+#endif
+#ifdef S_IWUSR
{ LINUX_S_IWUSR, S_IWUSR },
+#endif
+#ifdef S_IXUSR
{ LINUX_S_IXUSR, S_IXUSR },
+#endif
+#ifdef S_IRGRP
{ LINUX_S_IRGRP, S_IRGRP },
+#endif
+#ifdef S_IWGRP
{ LINUX_S_IWGRP, S_IWGRP },
+#endif
+#ifdef S_IXGRP
{ LINUX_S_IXGRP, S_IXGRP },
+#endif
+#ifdef S_IROTH
{ LINUX_S_IROTH, S_IROTH },
+#endif
+#ifdef S_IWOTH
{ LINUX_S_IWOTH, S_IWOTH },
+#endif
+#ifdef S_IXOTH
{ LINUX_S_IXOTH, S_IXOTH },
+#endif
{ 0, 0 }
};