diff --git a/package/mmc-utils/0001-fix-mmc-h-includes.patch b/package/mmc-utils/0001-fix-mmc-h-includes.patch deleted file mode 100644 index 8d0b2eb..0000000 --- a/package/mmc-utils/0001-fix-mmc-h-includes.patch +++ /dev/null @@ -1,41 +0,0 @@ -mmc-utils: fix mmc.h includes - -Some toolchains include asm-generic/int-l64.h from their asm/types.h -file for certain 64-bit architectures. This causes a conflict between -types like this one: - -asm-generic/int-l64.h:28:25: error: conflicting types for '__s64' - typedef __signed__ long __s64; - ^ -In file included from mmc.h:17:0, - from mmc_cmds.c:30: -asm-generic/int-ll64.h:29:44: note: previous declaration of '__s64' was -here - __extension__ typedef __signed__ long long __s64; - -[Ryan: added include of linux/types.h because mmc/ioctl.h does not - include it in kernel version before 3.4] - -Signed-off-by: Vicente Olivert Riera -Signed-off-by: Ryan Barnett ---- - mmc.h | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) -diff --git a/mmc.h b/mmc.h -index 9871d62..2d54ec5 100644 ---- a/mmc.h -+++ b/mmc.h -@@ -14,9 +14,12 @@ - * Boston, MA 021110-1307, USA. - */ - --#include -+#include - #include - #include -+#ifndef _ASM_GENERIC_INT_L64_H -+#include -+#endif - - #define CHECK(expr, msg, err_stmt) { if (expr) { fprintf(stderr, msg); err_stmt; } } - diff --git a/package/mmc-utils/0001-mmc_cmds.c-fix-build-with-gcc-4.9.patch b/package/mmc-utils/0001-mmc_cmds.c-fix-build-with-gcc-4.9.patch new file mode 100644 index 0000000..7725f9c --- /dev/null +++ b/package/mmc-utils/0001-mmc_cmds.c-fix-build-with-gcc-4.9.patch @@ -0,0 +1,37 @@ +From 6208cc78f6efd1fafc4f5bc6a487247a383df80f Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sat, 28 Sep 2019 20:44:52 +0200 +Subject: [PATCH] mmc_cmds.c: fix build with gcc 4.9 + +Fix following error with gcc 4.9: + +mmc_cmds.c:1918:9: error: missing braces around initializer [-Werror=missing-braces] + struct rpmb_frame frame_status = {0}; + +Fixes: + - http://autobuild.buildroot.org/results/bf3b6f9f6ef39b99842b3c92495b7bf359c68158 + +Signed-off-by: Fabrice Fontaine +[Upstream status: sent to linux-mmc@vger.kernel.org] +--- + mmc_cmds.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/mmc_cmds.c b/mmc_cmds.c +index fb37189..6b09f26 100644 +--- a/mmc_cmds.c ++++ b/mmc_cmds.c +@@ -1915,7 +1915,9 @@ static int do_rpmb_op(int fd, + u_int16_t rpmb_type; + struct mmc_ioc_multi_cmd *mioc; + struct mmc_ioc_cmd *ioc; +- struct rpmb_frame frame_status = {0}; ++ struct rpmb_frame frame_status; ++ ++ memset(&frame_status, 0, sizeof(frame_status)); + + if (!frame_in || !frame_out || !out_cnt) + return -EINVAL; +-- +2.23.0 + diff --git a/package/mmc-utils/mmc-utils.hash b/package/mmc-utils/mmc-utils.hash new file mode 100644 index 0000000..86c644f --- /dev/null +++ b/package/mmc-utils/mmc-utils.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 df8876e0e671f502bb8872cecca3cc6d1055253fa314f3544d22829e129e024e mmc-utils-d40ec535b9d4e4c974e8c2fbfb422cd0348cc5e8.tar.gz +sha256 c3165393bcd710624e2909327a6fbeb736c47bdbe66de1c1a364ac7324d3e4d6 mmc.h diff --git a/package/mmc-utils/mmc-utils.mk b/package/mmc-utils/mmc-utils.mk index 7473a1b..8c264a4 100644 --- a/package/mmc-utils/mmc-utils.mk +++ b/package/mmc-utils/mmc-utils.mk @@ -4,16 +4,21 @@ # ################################################################################ -MMC_UTILS_VERSION = 2cb6695e8dec00d887bdd5309d1b57d836fcd214 +MMC_UTILS_VERSION = d40ec535b9d4e4c974e8c2fbfb422cd0348cc5e8 MMC_UTILS_SITE = git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git -MMC_UTILS_LICENSE = GPLv2 +MMC_UTILS_LICENSE = GPL-2.0 +MMC_UTILS_LICENSE_FILES = mmc.h +# override AM_CFLAGS as the project Makefile uses it to pass +# -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2, and the latter conflicts +# with the _FORTIFY_SOURCE that we pass when hardening options are +# enabled. define MMC_UTILS_BUILD_CMDS - $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) AM_CFLAGS= endef define MMC_UTILS_INSTALL_TARGET_CMDS - $(INSTALL) -D -m 0755 $(@D)/mmc $(TARGET_DIR)/usr/bin/mmc + $(MAKE) -C $(@D) prefix=/usr DESTDIR=$(TARGET_DIR) install endef $(eval $(generic-package))