From: Daniel Golle Date: Wed, 15 Jul 2020 21:59:59 +0000 (+0100) Subject: jail: fs: fix build on uClibc-ng X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=86a5105c81d93da7f41ca71ea82f5a479990da62;p=project%2Fprocd.git 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 --- 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;