[PATCH mtd-utils 1/5] ubifs-utils: defs.h: Include <fcntl.h>
Fabio Estevam
festevam at gmail.com
Mon Feb 17 16:15:08 PST 2025
Include the <fcntl.h> header file to fix the following build error
when building with musl:
| In file included from ../git/ubifs-utils/common/defs.h:18,
| from ../git/ubifs-utils/common/bitops.c:7:
| ../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:4822: ubifs-utils/common/mkfs_ubifs-bitops.o] Error 1
Signed-off-by: Fabio Estevam <festevam at gmail.com>
---
ubifs-utils/common/defs.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/ubifs-utils/common/defs.h b/ubifs-utils/common/defs.h
index 7ff1771674d9..2cea4993e15a 100644
--- a/ubifs-utils/common/defs.h
+++ b/ubifs-utils/common/defs.h
@@ -6,6 +6,7 @@
#ifndef __UBIFS_DEFS_H__
#define __UBIFS_DEFS_H__
+#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
--
2.34.1
More information about the linux-mtd
mailing list