From patchwork Mon May 28 15:58:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 137102 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp2993415lji; Mon, 28 May 2018 08:59:03 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq0LqbKw/ZmZp2nbUnfK/OBDCjA9uyi1leK68whCoCIKoU3+VMxPonOjZmBJM5Xm6WJKLZH X-Received: by 2002:a62:404f:: with SMTP id n76-v6mr14064774pfa.185.1527523143314; Mon, 28 May 2018 08:59:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527523143; cv=none; d=google.com; s=arc-20160816; b=FBeB1hHL0OGckbglhorQZV81sKYIFJzccJkcsTbMDOqsk2xGQaflB4wbFHCB8rW9Kp IDc5QOrlaiP6d0Ljt9+fC0weUYDy3NImb3jX/UvBUeW7CHHlzJqxm8GwvuS/tPBGivTz qfj4z5EcQGzvz3sAaVDHYFNz13JjLfPCFJf1OOlVLZ9W7Ve1XfnQaUfjOC4m6WOGWA5F tCTz+J6iQHWGPfyF3Hm3+aA9wBJEpuR5BihRhUdhrrCP5l5ajjiAFiiIJdAymq8lswdK 36fxcg2g9f/EhM/riuaIf6DufUMtw3beBAm7d+X/KbDJJ4mTDMwunpfVtqLj7S5A7b6r ckjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=MT/iXUXPBpq/9WSFSp1Y4vR4x/pfmP2inCp8XovUenI=; b=IIP3M5ZKxr4Nj02/sEyF/z+HQh6L02NeGLg3aTs+Bdi4ujiCn7/tDOUS9a05HEVz+o MQF54H4H09R0AcNhkfqDt1pi91eWdleuv0bW148WDrAXT0+UIKRNTpj3uoZZ3wdgVwuW ZW+JI3IvvxS72PPyAm8tnto1tKIvcZ2GSQDThiME8x1zFEC1d8CfISlY1eojkvvysr23 dVh2fEWzDqZ8TjKgITy4GBJ79ObJGtEYu/MIn0Lt3Tz1Z9eHDMBMAx9LvURna9Su6gmO O14Y6C8JsY4t1K19Tp6QoshcvmEYUIG5Us6oVDvJtUHNap+nVlXCu6LNA0WLLO/y32Ia Fbqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=Zjen7Tam; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id r4-v6si31286485pff.24.2018.05.28.08.59.03; Mon, 28 May 2018 08:59:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=Zjen7Tam; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 9DCDE7481C; Mon, 28 May 2018 15:59:00 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pg0-f47.google.com (mail-pg0-f47.google.com [74.125.83.47]) by mail.openembedded.org (Postfix) with ESMTP id 2C52B7458B for ; Mon, 28 May 2018 15:58:33 +0000 (UTC) Received: by mail-pg0-f47.google.com with SMTP id a3-v6so5424085pgt.13 for ; Mon, 28 May 2018 08:58:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=u6p/DpSapBT/mTbcHBPd0bwWfiu/TxHVWIEahU7rXyk=; b=Zjen7TamBvC6tegB5OnsO5y9DSSsv1uIb9bGEfx1QnnqT5nrIsM1zlhWIzGYYyHQzf AMDx+L5LL25TmM46+kCYpauXphWs5jgNu4kLAInQPgbIoAqh0NuSJ+heM6Uak7GaFXFL 4qZGazKVmrt1PQhu/63o9ljP2amB1yMekjmCfYVeRGKPbZD22KOqbnaXV+pubKVVxeLA 6SmbaTIchGVDNT37CZh9pYNY/blydh9+c1/i3iK2lKvk+hoeRI0wQI+PP+H0GyR09rBr Gvmpg9aAxT6XS86TI25TuY+ZuZ93d7apCsM05NlkgS3l/4QJcbhJ/QU9uHyFG775axug HF2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=u6p/DpSapBT/mTbcHBPd0bwWfiu/TxHVWIEahU7rXyk=; b=YapZID3/C5AVDvek4LB6V2fYMomNw3EYV2xbjQ78sq87y1JBe/HpPRd4cJx4BfBSFG S9amtHVyb5vffwPquIiAj/n/29PY+RuUl99NDw5zK7vAdWQDfutHK8bbQNsj6cFtXdIt TyyuvSNU/GB4KDiy5HDyVMKGjEWPcfVGCBWGj2Hb2Jue6EyLsGsFcFsCTxJUGNtB7fwC W4qDE+AB+XBlAGM20iUpovHWcR2hictPhOhpvDIYTqe+4qOsRdKi4bMt0bOt/Sa5k4UC kTkm9Uy0dXtO4npFuZ64VMLZq43ocQhN5FT4YMRU/LKndsxX5YUKpOPuRCh7/5GQQOfv tWhg== X-Gm-Message-State: ALKqPwcUD29Q3svVcPT7Cu62Olb7oUnDNsUQS9Iz/OM115VyX8/1OiIw hrL1yAuJbTvxCXajEx2phX32yg== X-Received: by 2002:a65:418b:: with SMTP id a11-v6mr2151396pgq.118.1527523114488; Mon, 28 May 2018 08:58:34 -0700 (PDT) Received: from localhost.localdomain ([2601:646:877f:9499::c68]) by smtp.gmail.com with ESMTPSA id v15-v6sm63041892pfa.107.2018.05.28.08.58.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 May 2018 08:58:33 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Mon, 28 May 2018 08:58:32 -0700 Message-Id: <20180528155833.24224-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528155833.24224-1-raj.khem@gmail.com> References: <20180528155833.24224-1-raj.khem@gmail.com> Subject: [OE-core] [PATCH 2/3] systemd: Define basename() for musl X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- ...patible-basename-for-non-glibc-syste.patch | 33 +++++++++++++++++++ meta/recipes-core/systemd/systemd_237.bb | 1 + 2 files changed, 34 insertions(+) create mode 100644 meta/recipes-core/systemd/systemd/0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch -- 2.17.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-core/systemd/systemd/0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/meta/recipes-core/systemd/systemd/0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch new file mode 100644 index 0000000000..736d525ad3 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch @@ -0,0 +1,33 @@ +From 5f1f064c81ea30acf93cfa0fb466b38f094f488c Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 27 May 2018 08:36:44 -0700 +Subject: [PATCH] Define glibc compatible basename() for non-glibc systems + +Fixes builds with musl, even though systemd is adamant about +using non-posix basename implementation, we have a way out + +Upstream-Status: Inappropriate [musl specific] + +Signed-off-by: Khem Raj +--- + src/machine/machine-dbus.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c +index 2d7806491b..9a3bdb1d76 100644 +--- a/src/machine/machine-dbus.c ++++ b/src/machine/machine-dbus.c +@@ -29,6 +29,10 @@ + #include + #undef basename + ++#if !defined(__GLIBC__) ++#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src) ++#endif ++ + #include "alloc-util.h" + #include "bus-common-errors.h" + #include "bus-internal.h" +-- +2.17.0 + diff --git a/meta/recipes-core/systemd/systemd_237.bb b/meta/recipes-core/systemd/systemd_237.bb index c4743a6b9d..2e6558ded1 100644 --- a/meta/recipes-core/systemd/systemd_237.bb +++ b/meta/recipes-core/systemd/systemd_237.bb @@ -53,6 +53,7 @@ SRC_URI += "file://touchscreen.rules \ file://0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch \ file://libmount.patch \ file://0034-Fix-format-truncation-compile-failure-by-typecasting.patch \ + file://0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch \ " SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"