From patchwork Thu Apr 13 20:41:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 97406 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp13207qgf; Thu, 13 Apr 2017 13:46:17 -0700 (PDT) X-Received: by 10.107.23.198 with SMTP id 189mr6062810iox.179.1492116377162; Thu, 13 Apr 2017 13:46:17 -0700 (PDT) Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id p139si210239itp.22.2017.04.13.13.46.16; Thu, 13 Apr 2017 13:46:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-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; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 5A35277F3C; Thu, 13 Apr 2017 20:43:16 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pg0-f66.google.com (mail-pg0-f66.google.com [74.125.83.66]) by mail.openembedded.org (Postfix) with ESMTP id 8F3BC77E92 for ; Thu, 13 Apr 2017 20:41:54 +0000 (UTC) Received: by mail-pg0-f66.google.com with SMTP id 63so387081pgh.0 for ; Thu, 13 Apr 2017 13:41:56 -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=yS6JnvUJCNZ8L5D+kdTbl0T2/cSjMgi3mYXgJe3RWYE=; b=AC+z1b4TCxuGxGKEV29P+gg8DKNs8ZkKAygju3fQqw1HijB4udACngNfwAc09yQwyo /wA3zl6dhVDREn8CopV+CrUp0rN1BsD3ND4JpoxrVyw0bNGW+mpuGn6W72jjxUAGHurr a3i4hHdTt6h7nFZuv0tEPbljcwoXXAn0aVzwjW2kjhcH3b2jziQsStheAK6hZXgoBhaF mk+PKU/JtkhcZSrwwl+882ijBuh5oCz3rK+btFbXn+uJoLYtPGHIIW2+bNXn7k9G9Rww aFGnBM1/NCnutfhlx2aotMJSWImegdmXLX1UalnhtfZNtnoTlmUoX5o7yO5rtNFvaivC CMcA== 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=yS6JnvUJCNZ8L5D+kdTbl0T2/cSjMgi3mYXgJe3RWYE=; b=G14ECjaR8D+IcHPdR1/sPTKdsxR2DrYoTzlWKxfyHFRBd+GFRiOmtmRFaS0mOtfy9J Dl2IOresX/VdSqOcPKMJo45YflpfjrqwvyKDPB57w235sG4DxC11fAk4tPIj0780I2jp TmVU2oYsKUOIGxxYA3a0L0WSjbCcuTvNyHgeiwSuvSelzF8lfaCnKlFEzq/RK7TPyxCl rNOANn/mWA2sRFK+bx8mQcpjIKMjR8FE5WnYOErtjQIeUZh++tKZlUxTCB9vOxPqQqtZ guhcPfGE2pzRCcOOLq5jLb43k1oX5JE8u1Nl0ECD4FsjlJ5yHd3YXQr9gZzyBiy6dGzi Cy6g== X-Gm-Message-State: AN3rC/6siNIPaSJkB+Z5oh+HoHu7AVU4nmW7pkHIo/Iloilk6uTDPQE6 1S0L+WGID4tM+woF X-Received: by 10.84.224.70 with SMTP id a6mr5402886plt.25.1492116116142; Thu, 13 Apr 2017 13:41:56 -0700 (PDT) Received: from localhost.localdomain (c-76-102-32-192.hsd1.ca.comcast.net. [76.102.32.192]) by smtp.gmail.com with ESMTPSA id u29sm44033332pfa.123.2017.04.13.13.41.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Apr 2017 13:41:55 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Thu, 13 Apr 2017 13:41:02 -0700 Message-Id: <20170413204106.30679-25-raj.khem@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170413204106.30679-1-raj.khem@gmail.com> References: <20170413204106.30679-1-raj.khem@gmail.com> Subject: [oe] [meta-oe][ 25/29] libutempter: Fix build with musl X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- meta-oe/recipes-support/libutempter/libutempter.bb | 4 +- .../libutempter-remove-glibc-assumption.patch | 81 ++++++++++++++++++++++ 2 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-support/libutempter/libutempter/libutempter-remove-glibc-assumption.patch -- 2.12.2 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-oe/recipes-support/libutempter/libutempter.bb b/meta-oe/recipes-support/libutempter/libutempter.bb index 0282ba500..8c84cb376 100644 --- a/meta-oe/recipes-support/libutempter/libutempter.bb +++ b/meta-oe/recipes-support/libutempter/libutempter.bb @@ -11,7 +11,9 @@ SRCREV = "3ef74fff310f09e2601e241b9f042cd39d591018" PV = "1.1.6-alt2+git${SRCPV}" SRC_URI = "git://git.altlinux.org/people/ldv/packages/libutempter.git \ - file://0001-Fix-macro-error.patch" + file://0001-Fix-macro-error.patch \ + file://libutempter-remove-glibc-assumption.patch \ + " S = "${WORKDIR}/git/${BPN}" diff --git a/meta-oe/recipes-support/libutempter/libutempter/libutempter-remove-glibc-assumption.patch b/meta-oe/recipes-support/libutempter/libutempter/libutempter-remove-glibc-assumption.patch new file mode 100644 index 000000000..6ed93355b --- /dev/null +++ b/meta-oe/recipes-support/libutempter/libutempter/libutempter-remove-glibc-assumption.patch @@ -0,0 +1,81 @@ +diff -Naur libutempter-1.1.6.orig/utempter.c libutempter-1.1.6/utempter.c +--- libutempter-1.1.6.orig/utempter.c 2010-11-04 13:14:53.000000000 -0400 ++++ libutempter-1.1.6/utempter.c 2014-06-20 16:37:09.762403323 -0400 +@@ -34,13 +34,7 @@ + #include + #include + +-#ifdef __GLIBC__ + # include +-#elif defined(__FreeBSD__) +-# include +-#else +-# error Unsupported platform +-#endif /* __GLIBC__ || __FreeBSD__ */ + + #define DEV_PREFIX "/dev/" + #define DEV_PREFIX_LEN (sizeof(DEV_PREFIX)-1) +@@ -106,17 +100,12 @@ + + static int + write_uwtmp_record(const char *user, const char *term, const char *host, +-#ifdef __GLIBC__ + pid_t pid, +-#endif + int add) + { + struct utmp ut; + struct timeval tv; +- +-#ifdef __GLIBC__ + size_t offset; +-#endif + + memset(&ut, 0, sizeof(ut)); + +@@ -128,8 +117,6 @@ + if (host) + strncpy(ut.ut_host, host, sizeof(ut.ut_host)); + +-#ifdef __GLIBC__ +- + offset = (strlen(term) <= sizeof(ut.ut_id)) ? 0 : + strlen(term) - sizeof(ut.ut_id); + strncpy(ut.ut_id, term + offset, sizeof(ut.ut_id)); +@@ -156,27 +143,6 @@ + + (void) updwtmp(_PATH_WTMP, &ut); + +-#elif defined(__FreeBSD__) +- +- ut.ut_time = tv.tv_sec; +- +- if (add) +- { +- login(&ut); +- } else +- { +- if (logout(term) != 1) +- { +-#ifdef UTEMPTER_DEBUG +- fprintf(stderr, "utempter: logout: %s\n", +- strerror(errno)); +-#endif +- exit(EXIT_FAILURE); +- } +- } +- +-#endif /* __GLIBC__ || __FreeBSD__ */ +- + #ifdef UTEMPTER_DEBUG + fprintf(stderr, + "utempter: DEBUG: utmp/wtmp record %s for terminal '%s'\n", +@@ -255,8 +221,6 @@ + validate_device(device); + + return write_uwtmp_record(pw->pw_name, device + DEV_PREFIX_LEN, host, +-#ifdef __GLIBC__ + pid, +-#endif + add); + }