Message ID | 20220426100605.36019-1-ulf.hansson@linaro.org |
---|---|
State | New |
Headers | show |
Series | mmc-utils: Fix build error MMC_BLOCK_MAJOR undeclared | expand |
diff --git a/mmc.h b/mmc.h index 25d6864..0796532 100644 --- a/mmc.h +++ b/mmc.h @@ -17,6 +17,7 @@ * those modifications are Copyright (c) 2016 SanDisk Corp. */ +#include <linux/major.h> #include <linux/mmc/ioctl.h> /* From kernel linux/mmc/mmc.h */
The reported build error: In function read_extcsd: mmc_cmds.c:72:18: error: MMC_BLOCK_MAJOR undeclared (first use in this function) In commit 118dc4a0909f ("mmc-utils: Remove unused MMC_BLOCK_MAJOR") the define for MMC_BLOCK_MAJOR was dropped. In a way this commit is still correct, but unfortunately it also introduced a dependency to a commit for the Linux kernel (83fc5dd57f86 mmc: fix compilation of user API), which fixes the mmc uapi header file (mmc: fix compilation of user API). Rather than relying on the commit in the kernel, let's include the missing header for MMC_BLOCK_MAJOR. Reported-by: Ming Liu <liu.ming50@gmail.com> Fixes: 118dc4a0909f ("mmc-utils: Remove unused MMC_BLOCK_MAJOR") Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> --- mmc.h | 1 + 1 file changed, 1 insertion(+)