diff --git a/meta-oniro-staging/recipes-connectivity/networkmanager/networkmanager/fix-strerror_r.patch b/meta-oniro-staging/recipes-connectivity/networkmanager/networkmanager/fix-strerror_r.patch
new file mode 100644
index 0000000000000000000000000000000000000000..c284f75e7e863413684d6be7cb3a8cadb66908dc
--- /dev/null
+++ b/meta-oniro-staging/recipes-connectivity/networkmanager/networkmanager/fix-strerror_r.patch
@@ -0,0 +1,34 @@
+From 18765456467af24786bc2397ca72affe42149504 Wed Sep  8 22:33:40 2021
+From: Bernhard Rosenkraenzer <bernhard.rosenkraenzer.ext@huawei.com>
+Date: Wed,  8 Sep 2021 22:33:40 +0200
+Subject: [PATCH] Fix crash on startup when using musl
+
+nm_strerror_native_r makes use of a glibc extension to strerror_r
+when _GNU_SOURCE is defined -- even when not using glibc.
+
+musl uses _GNU_SOURCE for some extensions, but doesn't have the
+strerror_r for unknown error codes extension -- resulting in a
+NULL pointer being passed to UTF-8 check functions that don't
+check for it.
+
+Use the non-glibc code path when __GLIBC__ isn't set.
+
+Signed-off-by: Bernhard Rosenkraenzer <bernhard.rosenkraenzer.ext@huawei.com>
+Upstream-status: Inappropriate [problem doesn't exist in current releases]
+
+---
+ nm-errno.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff -up NetworkManager-1.22.10/shared/nm-glib-aux/nm-errno.c.omv~ NetworkManager-1.22.10/shared/nm-glib-aux/nm-errno.c
+--- NetworkManager-1.22.10/shared/nm-glib-aux/nm-errno.c.omv~	2021-09-08 22:10:10.753007649 +0200
++++ NetworkManager-1.22.10/shared/nm-glib-aux/nm-errno.c	2021-09-08 22:18:11.975338808 +0200
+@@ -106,7 +106,7 @@ nm_strerror_native_r (int errsv, char *b
+ 	nm_assert (buf);
+ 	nm_assert (buf_size > 0);
+ 
+-#if (_POSIX_C_SOURCE >= 200112L) && !  _GNU_SOURCE
++#if !defined(__GLIBC__) || ((_POSIX_C_SOURCE >= 200112L) && !  _GNU_SOURCE)
+ 	/* XSI-compliant */
+ 	{
+ 		int errno_saved = errno;
diff --git a/meta-oniro-staging/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb b/meta-oniro-staging/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb
index ff784b8ce3d8e3d2655356c5929a8edd1a498273..32cabd1c9d29d124f2ba00642f52d3379e022f56 100644
--- a/meta-oniro-staging/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb
+++ b/meta-oniro-staging/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb
@@ -27,6 +27,7 @@ SRC_URI = " \
     file://0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch \
     file://0002-Do-not-create-settings-settings-property-documentati.patch \
     file://fix_reallocarray_check.patch \
+    file://fix-strerror_r.patch \
 "
 SRC_URI_append_libc-musl = " \
     file://musl/0001-Fix-build-with-musl-systemd-specific.patch \