From patchwork Thu Mar 12 11:47:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 1253507 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=mVpTxVcv; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48dRsp2fl4z9sPR for ; Thu, 12 Mar 2020 22:48:13 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 99D0F8945E; Thu, 12 Mar 2020 11:48:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NxmBld6Jldk1; Thu, 12 Mar 2020 11:48:10 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id CB36489473; Thu, 12 Mar 2020 11:48:10 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 7C8841BF41C for ; Thu, 12 Mar 2020 11:48:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 6C2E689478 for ; Thu, 12 Mar 2020 11:48:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H4jDuM8p74NS for ; Thu, 12 Mar 2020 11:48:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) by hemlock.osuosl.org (Postfix) with ESMTPS id 582AD8945E for ; Thu, 12 Mar 2020 11:48:08 +0000 (UTC) Received: by mail-qk1-f179.google.com with SMTP id u25so5586612qkk.3 for ; Thu, 12 Mar 2020 04:48:08 -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; bh=93Jun40vd9UBTUzHd2wrSrNDWyodExQyzl45Ek9r1XQ=; b=mVpTxVcvqCY9DmK/uoLSCeTE9ubO/X3GjOA8e54sBf2D+yc7LInZOkZqodGqK5fcNu kJzJYoB1W0yx7ZVrjwJCTgiVdAvfJuR4FAs4uXdEWn7rmM4egqD5g6x7IeQ8ruFlDchE 8bPm2q1Uhguuc/grSyrNHmZBeZdde020+qNW8/jNHsGnqycuBrWHsPymkFLBybv8A8iT UvK4IpJ8WzZ+LAqmfDb548jkqlGg8utmpK+1s1/WTorXkm59f304cIWxLKIZrV12H66P 0O5Kadu77vw904GsopoyCwzeyDGyDAexef6s1vxueemhABs0l5mR3rV/HoMH4E80eyjd r+Dw== 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; bh=93Jun40vd9UBTUzHd2wrSrNDWyodExQyzl45Ek9r1XQ=; b=nf+/GU9fqZ2vCev8T76u/SG6PXFS5tYZ1AAPjl1VRua+y6yvXMMj3Feoa2WYkegY9/ Uh1r6FZKlJAa2psfUsZRQOjHeautX1nP32FznNDaMOtALfXYtPfQaKx0hVs6kUwm/usw nI+c2mKA2/5op3bP8XP77/50R2CryJuDlpAzgvuSUzKFO+Ty0+Ocf4/D0Oq68lLMuFlk cRzU3K/p26RjNxr0EUn4mvecJVVVCnmgOBTSl0nmsl5zqQX1eCVyXjuyo2QDkzmiaVPk HyINimRy9rqnrwgF+SkIK5dJ/pxpEiFkJaaS6wCGRngco3uwH2gD/3AAlTpLpYwJCFOv 2R4A== X-Gm-Message-State: ANhLgQ0tVguXlNtmQeTdBWZBK4qLITdEm0fNNyGJF0+tQzxAb4DIV17h XDxZKoRp/zAaLi+QRJAe+rHn3PNZ X-Google-Smtp-Source: ADFU+vsJZsP4o28aHsphf+G57wGhTA+ajhNaWXN+YoJKznGmofFgWmAA7jJcuHDl95GOTJv02VYdwQ== X-Received: by 2002:a37:8e44:: with SMTP id q65mr7274055qkd.70.1584013687102; Thu, 12 Mar 2020 04:48:07 -0700 (PDT) Received: from casantos.remote.com ([177.97.126.92]) by smtp.gmail.com with ESMTPSA id l12sm10407575qtp.44.2020.03.12.04.48.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Mar 2020 04:48:06 -0700 (PDT) From: unixmania@gmail.com To: buildroot@buildroot.org Date: Thu, 12 Mar 2020 08:47:59 -0300 Message-Id: <20200312114759.31764-1-unixmania@gmail.com> X-Mailer: git-send-email 2.18.2 Subject: [Buildroot] [PATCH] package/util-linux: fix build for riscv64 and powerpc64le X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Carlos Santos MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Carlos Santos Pull two upstream patches that fix the declaration of pidfd_open and pidfd_send_signal. Fixes: http://autobuild.buildroot.net/results/2396b04478f9d358b94f2e2e05540625ddc9f205/ http://autobuild.buildroot.net/results/ed4b5ec61bd33d3ccf0ebb16000af46d0499366d/ Signed-off-by: Carlos Santos Signed-off-by: Sami Kerola Signed-off-by: Karel Zak --- ...-types.h-before-checking-SYS_pidfd_s.patch | 61 +++++++++++++++++++ .../0007-include-cleanup-pidfd-inckudes.patch | 39 ++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 package/util-linux/0006-kill-include-sys-types.h-before-checking-SYS_pidfd_s.patch create mode 100644 package/util-linux/0007-include-cleanup-pidfd-inckudes.patch diff --git a/package/util-linux/0006-kill-include-sys-types.h-before-checking-SYS_pidfd_s.patch b/package/util-linux/0006-kill-include-sys-types.h-before-checking-SYS_pidfd_s.patch new file mode 100644 index 0000000000..a892298faf --- /dev/null +++ b/package/util-linux/0006-kill-include-sys-types.h-before-checking-SYS_pidfd_s.patch @@ -0,0 +1,61 @@ +From 3cfde0370d3a8949df0c5bcf447cec6692910ed2 Mon Sep 17 00:00:00 2001 +From: Sami Kerola +Date: Sat, 15 Feb 2020 21:12:50 +0000 +Subject: [PATCH] kill: include sys/types.h before checking + SYS_pidfd_send_signal + +Including sys/types.h must happen before SYS_pidfd_send_signal is checked, +because that header defines variable in normal conditions. When sys/types.h +does not have SYS_pidfd_send_signal then fallback is defined in config.h +that is included by default, and has therefore worked fine before and after +this change. + +Signed-off-by: Sami Kerola +--- + include/pidfd-utils.h | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 deletions(-) + +diff --git a/include/pidfd-utils.h b/include/pidfd-utils.h +index 593346576..0baedd2c9 100644 +--- a/include/pidfd-utils.h ++++ b/include/pidfd-utils.h +@@ -1,26 +1,28 @@ + #ifndef UTIL_LINUX_PIDFD_UTILS + #define UTIL_LINUX_PIDFD_UTILS + +-#if defined(__linux__) && defined(SYS_pidfd_send_signal) +-# include ++#if defined(__linux__) + # include ++# if defined(SYS_pidfd_send_signal) ++# include + +-# ifndef HAVE_PIDFD_OPEN ++# ifndef HAVE_PIDFD_OPEN + static inline int pidfd_send_signal(int pidfd, int sig, siginfo_t *info, + unsigned int flags) + { + return syscall(SYS_pidfd_send_signal, pidfd, sig, info, flags); + } +-# endif ++# endif + +-# ifndef HAVE_PIDFD_SEND_SIGNAL ++# ifndef HAVE_PIDFD_SEND_SIGNAL + static inline int pidfd_open(pid_t pid, unsigned int flags) + { + return syscall(SYS_pidfd_open, pid, flags); + } +-# endif ++# endif + +-# define UL_HAVE_PIDFD 1 ++# define UL_HAVE_PIDFD 1 + +-#endif /* __linux__ && SYS_pidfd_send_signal */ ++# endif /* SYS_pidfd_send_signal */ ++#endif /* __linux__ */ + #endif /* UTIL_LINUX_PIDFD_UTILS */ +-- +2.18.2 + diff --git a/package/util-linux/0007-include-cleanup-pidfd-inckudes.patch b/package/util-linux/0007-include-cleanup-pidfd-inckudes.patch new file mode 100644 index 0000000000..4d4cc1f20d --- /dev/null +++ b/package/util-linux/0007-include-cleanup-pidfd-inckudes.patch @@ -0,0 +1,39 @@ +From 0a4035ff2e4fd5b5ae0cf8f8665696c2aff53b75 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 10 Mar 2020 11:43:16 +0100 +Subject: [PATCH] include: cleanup pidfd inckudes + +Signed-off-by: Karel Zak +--- + include/pidfd-utils.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/include/pidfd-utils.h b/include/pidfd-utils.h +index 0baedd2c9..4a6c3a604 100644 +--- a/include/pidfd-utils.h ++++ b/include/pidfd-utils.h +@@ -3,10 +3,10 @@ + + #if defined(__linux__) + # include +-# if defined(SYS_pidfd_send_signal) ++# if defined(SYS_pidfd_send_signal) && defined(SYS_pidfd_open) + # include + +-# ifndef HAVE_PIDFD_OPEN ++# ifndef HAVE_PIDFD_SEND_SIGNAL + static inline int pidfd_send_signal(int pidfd, int sig, siginfo_t *info, + unsigned int flags) + { +@@ -14,7 +14,7 @@ static inline int pidfd_send_signal(int pidfd, int sig, siginfo_t *info, + } + # endif + +-# ifndef HAVE_PIDFD_SEND_SIGNAL ++# ifndef HAVE_PIDFD_OPEN + static inline int pidfd_open(pid_t pid, unsigned int flags) + { + return syscall(SYS_pidfd_open, pid, flags); +-- +2.18.2 +