From 86a5105c81d93da7f41ca71ea82f5a479990da62 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Wed, 15 Jul 2020 22:59:59 +0100 Subject: [PATCH] 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 --- jail/fs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- 2.30.2