Fix MS_LAZYTIME not defined on uclibc#753
Conversation
Add local patch pending upstream[0] to fix build failure with uclibc. [0]: libfuse/libfuse#753 Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
util/fusermount.c
Outdated
|
|
||
| /* uclibc doesn't define MS_LAZYTIME */ | ||
| #ifndef MS_LAZYTIME | ||
| #define MS_LAZYTIME (1<<25) |
There was a problem hiding this comment.
Where does this value come from? (please document in the comment)
There was a problem hiding this comment.
Hi @Nikratio,
it comes from Linux header mount.h:
https://elixir.bootlin.com/linux/v6.2.8/source/include/uapi/linux/mount.h#L39
and it never changed value throug various versions since it's been added with Linux 4.0:
https://elixir.bootlin.com/linux/v4.0.9/source/include/uapi/linux/fs.h#L93
Unforunately uclibc doesn't add it to <sys/mount.h>. The other chance to fix the bug is to include Linux's:
include/uapi/linux/mount.h
but before Linux 5.0 that define is contained in:
https://elixir.bootlin.com/linux/v4.20.17/source/include/uapi/linux/fs.h#L133
So I don't know if that's a good idea. Or if we do that I can check against Linux version and include the 2 different headers.
There was a problem hiding this comment.
There's nothing wrong with hardcoding the value, I just want you to add the source to the (C) comment in the file :-)
There was a problem hiding this comment.
You're right, I don't know why I've left a commit so bad written :-/
|
This patch would miss util/fusermount.c. Can you try out this? I don't see a problem to include multiple header files - nothing bad should happen, except there would be a bug in the headers. And I have the feeling we need a test for ulibc compilation. |
Unfortunately <linux/mount.h> is not always present because we don't always have Linux Headers installed: I understand your goal to use includes instead of local redefinition of macros, but while dealing with kernel includes
It would be great! |
|
Ok, yeah, if linux/mount.h is not always available it makes it complicated. |
bsbernd
left a comment
There was a problem hiding this comment.
Also needs to be defined in util/fusermount.c. Maybe we should add a mount_compat.h?
Good idea, indeed I was looking exactly for something like that to touch only one file instead of 2. |
Add local patch pending upstream[0] to fix build failure with uclibc. [0]: libfuse/libfuse#753 Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Add local patch pending upstream[0] to fix build failure with uclibc. [0]: libfuse/libfuse#753 Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Add local patch pending upstream[0] to fix build failure with uclibc. [0]: libfuse/libfuse#753 Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Add local patch pending upstream[0] to fix build failure with uclibc. [0]: libfuse/libfuse#753 Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
|
Tagging this as "draft" per the comments above. Please let me know when this is ready for review. |
as well as <sys/mount.h> inclusion to new fuse_mount_compat.h file. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
6ead4f3 to
d259b26
Compare
I've updated the patch. Hope it looks good to you. I start the building with Buildroot, so please wait because I still have to try to build! |
|
@Nikratio it built successfully all 44 combinations in Buildroot. |
Add local patch pending upstream[0] to fix build failure with uclibc. [0]: libfuse/libfuse#753 Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Add local patch pending upstream[0] to fix build failure with uclibc. [0]: libfuse/libfuse#753 Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Add local patch pending upstream[0] to fix build failure with uclibc. [0]: libfuse/libfuse#753 Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
No description provided.