[PATCH v3 mtd-utils 1/4] ubifs-utils: ubifs.h: Include <fcntl.h>

Khem Raj raj.khem at gmail.com
Tue Feb 18 17:46:38 PST 2025



On 2/18/25 4:33 PM, Fabio Estevam wrote:
> Include the <fcntl.h> header file to fix the following error
> when building with musl:
> 
> | In file included from ../git/ubifs-utils/common/compr.c:42:
> | ../git/ubifs-utils/libubifs/ubifs.h:313:9: error: unknown type name 'loff_t'; did you mean 'off_t'?
> |   313 |         loff_t ui_size;
> |       |         ^~~~~~
> |       |         off_t
> | ../git/ubifs-utils/libubifs/ubifs.h:1341:9: error: unknown type name 'loff_t'; did you mean 'off_t'?
> |  1341 |         loff_t i_size;
> |       |         ^~~~~~
> |       |         off_t
> | ../git/ubifs-utils/libubifs/ubifs.h:1342:9: error: unknown type name 'loff_t'; did you mean 'off_t'?
> |  1342 |         loff_t d_size;
> |       |         ^~~~~~
> |       |         off_t
> | ../git/ubifs-utils/libubifs/ubifs.h:1899:44: error: unknown type name 'loff_t'; did you mean 'off_t'?
> |  1899 |                              int deletion, loff_t new_size);
> |       |                                            ^~~~~~
> |       |                                            off_t
> | make: *** [Makefile:4878: ubifs-utils/common/mkfs_ubifs-compr.o] Error 1
> 
> Upstream-Status: Submitted [https://lore.kernel.org/linux-mtd/20250218001512.1862030-2-festevam@gmail.com/T/#t]
> Signed-off-by: Fabio Estevam <festevam at gmail.com>
> Reviewed-by: Zhihao Cheng <chengzhihao1 at huawei.com>

Reviewed-by: Khem Raj <raj.khem at gmail.com>

> ---
> Changes since v2:
> - None.
> 
>   ubifs-utils/libubifs/ubifs.h | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/ubifs-utils/libubifs/ubifs.h b/ubifs-utils/libubifs/ubifs.h
> index 0908a2289208..1c7bc7bd0c80 100644
> --- a/ubifs-utils/libubifs/ubifs.h
> +++ b/ubifs-utils/libubifs/ubifs.h
> @@ -11,6 +11,7 @@
>   #ifndef __UBIFS_H__
>   #define __UBIFS_H__
>   
> +#include <fcntl.h>
>   #include <string.h>
>   
>   #include "linux_types.h"




More information about the linux-mtd mailing list