[PATCH v2 mtd-utils 2/4] ubifs-utils: journal: Include <sys/stat.h>
Zhihao Cheng
chengzhihao1 at huawei.com
Tue Feb 18 04:00:59 PST 2025
在 2025/2/18 19:31, Fabio Estevam 写道:
> Include the <sys/stat.h> header file to fix the following error
> when building with musl:
>
> | ../git/ubifs-utils/libubifs/journal.c: In function 'ubifs_get_dent_type':
> | ../git/ubifs-utils/libubifs/journal.c:414:24: error: 'S_IFMT' undeclared (first use in this function)
> | 414 | switch (mode & S_IFMT) {
> | | ^~~~~~
> | ../git/ubifs-utils/libubifs/journal.c:414:24: note: each undeclared identifier is reported only once for each function it appears in
> | ../git/ubifs-utils/libubifs/journal.c:415:14: error: 'S_IFREG' undeclared (first use in this function)
> | 415 | case S_IFREG:
>
> Signed-off-by: Fabio Estevam <festevam at gmail.com>
> ---
> Changes since v1:
> - None.
>
> ubifs-utils/libubifs/journal.c | 1 +
> 1 file changed, 1 insertion(+)
>
Reviewed-by: Zhihao Cheng <chengzhihao1 at huawei.com>
> diff --git a/ubifs-utils/libubifs/journal.c b/ubifs-utils/libubifs/journal.c
> index e78ea14f3e69..45d82fd54bdb 100644
> --- a/ubifs-utils/libubifs/journal.c
> +++ b/ubifs-utils/libubifs/journal.c
> @@ -46,6 +46,7 @@
> * all the nodes.
> */
>
> +#include <sys/stat.h>
> #include "bitops.h"
> #include "kmem.h"
> #include "ubifs.h"
>
More information about the linux-mtd
mailing list