summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Golle2020-07-15 21:59:59 +0000
committerDaniel Golle2020-07-15 22:53:28 +0000
commit86a5105c81d93da7f41ca71ea82f5a479990da62 (patch)
treef5e12352c2e53fac182afac8b2eaf0b94bae6ad5
parentb41f76b5a070661aba9e558524ab22f23e387d74 (diff)
downloadprocd-86a5105c81d93da7f41ca71ea82f5a479990da62.tar.gz
jail: fs: fix build on uClibc-ng
MS_LAZYTIME is apparently not defined on uClibc-ng. Define that macro if not defined already. Also fix a copy&paste error which broke 'nolazytime' and 'nostrictatime' mount options. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
-rw-r--r--jail/fs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/jail/fs.c b/jail/fs.c
index 05f1fa7..da6f588 100644
--- a/jail/fs.c
+++ b/jail/fs.c
@@ -179,6 +179,10 @@ struct mount_opt {
char *optstr;
};
+#ifndef MS_LAZYTIME
+#define MS_LAZYTIME (1 << 25)
+#endif
+
static int parseOCImountopts(struct blob_attr *msg, unsigned long *mount_flags, char **mount_data, int *error)
{
struct blob_attr *cur;
@@ -237,7 +241,7 @@ static int parseOCImountopts(struct blob_attr *msg, unsigned long *mount_flags,
mf &= ~MS_STRICTATIME;
else if (!strcmp("lazytime", tmp))
mf |= MS_LAZYTIME;
- else if (!strcmp("nostrictatime", tmp))
+ else if (!strcmp("nolazytime", tmp))
mf &= ~MS_LAZYTIME;
else if (!strcmp("suid", tmp))
mf &= ~MS_NOSUID;