diff --git a/meta/recipes-gnome/libsecret/libsecret/0001-meson-add-option-to-disable-pam-tests.patch b/meta/recipes-gnome/libsecret/libsecret/0001-meson-add-option-to-disable-pam-tests.patch
index e0a5737eab8..e57aa94337b 100644
--- a/meta/recipes-gnome/libsecret/libsecret/0001-meson-add-option-to-disable-pam-tests.patch
+++ b/meta/recipes-gnome/libsecret/libsecret/0001-meson-add-option-to-disable-pam-tests.patch
@@ -1,24 +1,28 @@
-From a9fd7dcddf8bc64646f2945ab564357c23111541 Mon Sep 17 00:00:00 2001
+From 5a7a8d10d08892dda84092afbcf5fbdeceed0287 Mon Sep 17 00:00:00 2001
 From: Markus Volk <f_l_k@t-online.de>
 Date: Tue, 3 Dec 2024 15:58:17 +0100
 Subject: [PATCH] meson: add option to disable pam tests
 
 Upstream-Status: Denied [https://gitlab.gnome.org/GNOME/libsecret/-/merge_requests/151]
 
+refreshed for 0.21.8.2
+
 Signed-off-by: Markus Volk <f_l_k@t-online.de>
+Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
 ---
- meson_options.txt |  1 +
+ meson_options.txt |  6 ++++++
  pam/meson.build   | 44 +++++++++++++++++++++++---------------------
- 2 files changed, 24 insertions(+), 21 deletions(-)
+ 2 files changed, 29 insertions(+), 21 deletions(-)
 
 diff --git a/meson_options.txt b/meson_options.txt
-index 936eff8..2ae14f2 100644
+index d7b1628..0bed21d 100644
 --- a/meson_options.txt
 +++ b/meson_options.txt
-@@ -61,3 +61,8 @@
-   description: 'Build PAM module',
+@@ -66,3 +66,9 @@ option('test_setup',
+   value: 'auto',
+   description: 'Automatically setup a test environment when running tests',
  )
-
++
 +option('pam-tests',
 +  type: 'boolean',
 +  value: true,
diff --git a/meta/recipes-gnome/libsecret/libsecret/0002-file-collection-Make-sure-we-include-fcntl.h.patch b/meta/recipes-gnome/libsecret/libsecret/0002-file-collection-Make-sure-we-include-fcntl.h.patch
new file mode 100644
index 00000000000..2150e310b00
--- /dev/null
+++ b/meta/recipes-gnome/libsecret/libsecret/0002-file-collection-Make-sure-we-include-fcntl.h.patch
@@ -0,0 +1,33 @@
+From a5cd57f103038c06b64d5f6ebfd0e627bb40af4e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Schwarz?= <aschwarz@usp.br>
+Date: Tue, 15 Sep 2026 00:11:56 +0000
+Subject: [PATCH] file-collection: Make sure we include <fcntl.h>
+
+Without it, libsecret fails to compile with musl/libc++. Specifically,
+Clang compiler complains that the `open()` and the constants `O_CREAT`
+and `O_RDRW` are not defined.
+
+Fixes: https://gitlab.gnome.org/GNOME/libsecret/-/work_items/117
+
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsecret/-/merge_requests/181]
+Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
+---
+ libsecret/secret-file-collection.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libsecret/secret-file-collection.c b/libsecret/secret-file-collection.c
+index d528023..59667a4 100644
+--- a/libsecret/secret-file-collection.c
++++ b/libsecret/secret-file-collection.c
+@@ -24,6 +24,8 @@
+ #include <sys/file.h>
+ #include <errno.h>
+ 
++#include <fcntl.h>
++
+ EGG_SECURE_DECLARE (secret_file_collection);
+ 
+ #ifdef WITH_GCRYPT
+-- 
+GitLab
+
diff --git a/meta/recipes-gnome/libsecret/libsecret_0.21.7.bb b/meta/recipes-gnome/libsecret/libsecret_0.21.8.2.bb
similarity index 86%
rename from meta/recipes-gnome/libsecret/libsecret_0.21.7.bb
rename to meta/recipes-gnome/libsecret/libsecret_0.21.8.2.bb
index e77f83e92fe..409a2c0857c 100644
--- a/meta/recipes-gnome/libsecret/libsecret_0.21.7.bb
+++ b/meta/recipes-gnome/libsecret/libsecret_0.21.8.2.bb
@@ -12,8 +12,10 @@ inherit gnomebase gi-docgen vala gobject-introspection manpages
 
 DEPENDS += "glib-2.0 libgcrypt gettext-native"
 
-SRC_URI += "file://0001-meson-add-option-to-disable-pam-tests.patch"
-SRC_URI[archive.sha256sum] = "6b452e4750590a2b5617adc40026f28d2f4903de15f1250e1d1c40bfd68ed55e"
+SRC_URI += "file://0001-meson-add-option-to-disable-pam-tests.patch \
+            file://0002-file-collection-Make-sure-we-include-fcntl.h.patch \
+            "
+SRC_URI[archive.sha256sum] = "142948339c5b971d8f6a8c7099521f6fd319b6fe73d2694b4e6d3310ed28b6e6"
 
 EXTRA_OEMESON += "-Dpam-tests=false"
 
