From 78b04cca17252fba1d78dc9093c3b69149361d55 Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pavel.zhukov@huawei.com>
Date: Tue, 21 Jun 2022 13:35:25 +0200
Subject: [PATCH] systemd: Drop systemd-244-musl-1.2.2.patch

The FTBFS issue is gone and the patch is not needed anymore

Signed-off-by: Pavel Zhukov <pavel.zhukov@huawei.com>
---
 .../systemd/systemd-244-musl-1.2.2.patch      | 31 -------------------
 .../recipes-core/systemd/systemd_%.bbappend   |  3 --
 2 files changed, 34 deletions(-)
 delete mode 100644 meta-oniro-staging/recipes-core/systemd/systemd/systemd-244-musl-1.2.2.patch

diff --git a/meta-oniro-staging/recipes-core/systemd/systemd/systemd-244-musl-1.2.2.patch b/meta-oniro-staging/recipes-core/systemd/systemd/systemd-244-musl-1.2.2.patch
deleted file mode 100644
index 6019916c..00000000
--- a/meta-oniro-staging/recipes-core/systemd/systemd/systemd-244-musl-1.2.2.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-SPDX-FileCopyrightText: Huawei Inc.
-SPDX-License-Identifier: Apache-2.0
-
-From bernhard.rosenkraenzer.ext@huawei.com Tue Jul 13 04:09:16 2021
-From: Bernhard Rosenkraenzer <bernhard.rosenkraenzer.ext@huawei.com>
-Date: Tue, 13 Jul 2021 04:09:16 +0100
-Subject: [PATCH] Fix build with musl 1.2.2
-
-alloc-util.h redefines reallocarray() if HAVE_REALLOCARRAY isn't set,
-but there's nothing that sets HAVE_REALLOCARRAY -- so reallocarray
-is redefined unconditionally. The define seems to be a leftover from
-the time when systemd was using autoconf.
-
-Since reallocarray's prototype differs slightly in some libcs (such as
-musl 1.2.2), this breaks the build.
-
-Signed-off-by: Bernhard Rosenkraenzer <bernhard.rosenkraenzer.ext@huawei.com>
-Upstream-Status: Pending
-
-diff -up git/src/basic/alloc-util.h.omv~ git/src/basic/alloc-util.h
---- git/src/basic/alloc-util.h.omv~	2021-07-10 21:19:45.461902769 +0200
-+++ git/src/basic/alloc-util.h	2021-07-10 21:21:43.505118481 +0200
-@@ -96,7 +96,7 @@ _malloc_  _alloc_(1, 2) static inline vo
-         return malloc(size * need ?: 1);
- }
- 
--#if !HAVE_REALLOCARRAY
-+#if 0 /* Every libc we support has reallocarray, and prototypes differ slightly */
- _alloc_(2, 3) static inline void *reallocarray(void *p, size_t need, size_t size) {
-         if (size_multiply_overflow(size, need))
-                 return NULL;
diff --git a/meta-oniro-staging/recipes-core/systemd/systemd_%.bbappend b/meta-oniro-staging/recipes-core/systemd/systemd_%.bbappend
index d7ce6131..9ab87ecd 100644
--- a/meta-oniro-staging/recipes-core/systemd/systemd_%.bbappend
+++ b/meta-oniro-staging/recipes-core/systemd/systemd_%.bbappend
@@ -5,6 +5,3 @@
 # We support musl integration and the current status is stable for the scope of
 # the project.
 deltask warn_musl
-
-FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
-SRC_URI += "file://systemd-244-musl-1.2.2.patch"
-- 
GitLab