PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git
-PKG_SOURCE_DATE:=2024-03-05
-PKG_SOURCE_VERSION:=e1281d4de9166b7254ba30bb58f9191fc2c9e7fb
-PKG_MIRROR_HASH:=b5f760e679aeafb48c14dba72dbc6764a10ae5a43eda38d4525c4f535dbbab63
+PKG_SOURCE_DATE:=2025-12-21
+PKG_SOURCE_VERSION:=8f41ccbb40b887325f243bd73695a9e814610520
+PKG_MIRROR_HASH:=89fcbf96113e9407dc0890bff71425daed73c20f8a83a8fdadcc69916a32881f
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 \
- -UVERSION -DVERSION=\\\"$(shell echo $(PKG_SOURCE_VERSION) | cut -c -6)\\\"" \
+ -UVERSION -DVERSION=\\\"$(shell echo $(PKG_SOURCE_VERSION) | cut -c -6)\\\"" C=0 \
mmc
endef
--- /dev/null
+From 8a310d1bbb03d158220483e5de607d42ad5b4e2e Mon Sep 17 00:00:00 2001
+From: Michael Heimpold <mhei@heimpold.de>
+Date: Sun, 18 Jan 2026 21:52:49 +0100
+Subject: [PATCH] Drop _FORTIFY_SOURCE and prevent calls to git
+
+The fortify level is set globally in OpenWrt so it would
+be redefined when passed via CFLAGS and it would trigger
+a build error. To prevent this, dont set it here. Later,
+the previously/globally defined one (the OpenWrt one) is
+passed, but then unset and re-set again via Makefile to
+the originally desired one.
+
+Comment also out calls to git for version detection.
+We pass the version from the package definition to Makefile
+and operate not on a git checkout thus the calls would fail.
+
+Signed-off-by: Michael Heimpold <mhei@heimpold.de>
+---
+ Makefile | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/Makefile
++++ b/Makefile
+@@ -1,8 +1,9 @@
+ CC ?= gcc
+ # GIT_VERSION is set to the latest tag, number of commits since that tag, and the date of the last commit
+ # e.g., v1.0-5-2023-10-01
+-GIT_VERSION := "$(shell git describe --abbrev=0 --tags)-$$(git rev-list --count $$(git describe --abbrev=0 --tags)..HEAD)-$$(git log -1 --format=%cd --date=short)"
+-AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 \
++#GIT_VERSION := "$(shell git describe --abbrev=0 --tags)-$$(git rev-list --count $$(git describe --abbrev=0 --tags)..HEAD)-$$(git log -1 --format=%cd --date=short)"
++GIT_VERSION := "unknown"
++AM_CFLAGS = -D_FILE_OFFSET_BITS=64 \
+ -DVERSION=\"$(GIT_VERSION)\"
+ CFLAGS ?= -g -O2
+ objects = \