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

Zhihao Cheng chengzhihao1 at huawei.com
Tue Feb 18 04:00:30 PST 2025


在 2025/2/18 19:31, Fabio Estevam 写道:
> 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
> 
> Signed-off-by: Fabio Estevam <festevam at gmail.com>
> ---
> Changes since v1:
> - None.
> 
>   ubifs-utils/libubifs/ubifs.h | 1 +
>   1 file changed, 1 insertion(+)

Reviewed-by: Zhihao Cheng <chengzhihao1 at huawei.com>
> 
> 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