diff --git a/package/git/0001-fix-build-on-older-glibc.patch b/package/git/0001-fix-build-on-older-glibc.patch
new file mode 100644
index 0000000000..b95ca94c23
--- /dev/null
+++ b/package/git/0001-fix-build-on-older-glibc.patch
@@ -0,0 +1,45 @@
+From c53f54a87503ae729640a6f12302778a980f84d9 Mon Sep 17 00:00:00 2001
+From: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
+Date: Thu, 14 May 2026 21:09:07 +0530
+Subject: [PATCH] compat/posix.h: fix build on older glibc (missing sys/random.h)
+
+The build of the 'git' package fails on older Linux toolchains (like
+bootlin-aarch64-glibc-old which uses glibc 2.24) with the following
+error:
+
+compat/posix.h:159:24: fatal error: sys/random.h: No such file or directory
+                        
+This happens because Git recently made 'getrandom' the default
+CSPRNG_METHOD on Linux, which unconditionally includes <sys/random.h>.
+However, this header was only introduced in glibc 2.25.
+
+Fix this by using __has_include to check for the header's existence.
+If it's missing, undefine HAVE_GETRANDOM so Git falls back to its
+/dev/urandom implementation.
+
+Upstream: N/A (Buildroot specific fallback)
+Signed-off-by: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
+---
+ compat/posix.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/compat/posix.h b/compat/posix.h
+index faaae1b..1632221 100644
+--- a/compat/posix.h
++++ b/compat/posix.h
+@@ -155,6 +155,13 @@
+ #ifdef HAVE_ARC4RANDOM_LIBBSD
+ #include <bsd/stdlib.h>
+ #endif
++#if defined(HAVE_GETRANDOM) && defined(__linux__)
++# if defined(__has_include)
++#  if !__has_include(<sys/random.h>)
++#   undef HAVE_GETRANDOM
++#  endif
++# endif
++#endif
+ #ifdef HAVE_GETRANDOM
+ #include <sys/random.h>
+ #endif
+-- 
+2.54.0
