btrfs-progs: cmds: Fix build for using NAME_MAX
PATCH v2 1/1 btrfs-progs: cmds: Fix build for using NAME_MAX
There is some code that using NAME_MAX but it doesn't include header that is defined. This patch adds a line that includes linux/limits.h which defines NAME_MAX.
Issue: #386
Signed-off-by Sidong Yang <[email protected]>
---
v2:
- Added tag for github issue
--- cmds/filesystem-usage.c | 1 + 1 file changed, 1 insertion(+)
cmds/filesystem-usage.c +1 -0
@@ -24,6 +24,7 @@#include <stdarg.h> #include <getopt.h> #include <fcntl.h> +#include <linux/limits.h> #include "common/utils.h" #include "kerncompat.h"
Signature · 1 line
2.25.1
Quoted 7 lines · Sidong Yang
There is some code that using
NAME_MAXbut it doesn't include header that is defined. This patch adds a line that includeslinux/limits.hwhich definesNAME_MAX.Issue: #386
Signed-off-by Sidong Yang <[email protected]>
Reviewed-by Qu Wenruo <[email protected]>
Thanks,
Qu
Quoted 20 lines
---
v2:
- Added tag for github issue--- cmds/filesystem-usage.c | 1 + 1 file changed, 1 insertion(+)cmds/filesystem-usage.c +1
-0@@ -24,6 +24,7 @@#include <stdarg.h> #include <getopt.h> #include <fcntl.h> +#include <linux/limits.h> #include "common/utils.h" #include "kerncompat.h"
Quoted 7 lines · Sidong Yang
There is some code that using
NAME_MAXbut it doesn't include header that is defined. This patch adds a line that includeslinux/limits.hwhich definesNAME_MAX.Issue: #386
Signed-off-by Sidong Yang <[email protected]>
That was an easier than I thought, thanks. Verified by musl container build.