Re: [PATCH] mmc-utils: Fix build error MMC_BLOCK_MAJOR undeclared

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 26 Apr 2022 at 12:06, Ulf Hansson <ulf.hansson@xxxxxxxxxx> wrote:
>
> 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@xxxxxxxxx>
> Fixes: 118dc4a0909f ("mmc-utils: Remove unused MMC_BLOCK_MAJOR")
> Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>

Applied to mmc-utils.git master.

Kind regards
Uffe


> ---
>  mmc.h | 1 +
>  1 file changed, 1 insertion(+)
>
> 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 */
> --
> 2.25.1
>



[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux