From patchwork Fri Aug 5 06:34:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Li Wang X-Patchwork-Id: 1663919 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=NmEjtreo; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LzbRF3t88z9s1l for ; Fri, 5 Aug 2022 16:34:17 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 128503C941D for ; Fri, 5 Aug 2022 08:34:15 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [IPv6:2001:4b78:1:20::5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id D49633C1BDC for ; Fri, 5 Aug 2022 08:34:12 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by in-5.smtp.seeweb.it (Postfix) with ESMTPS id 4939260100C for ; Fri, 5 Aug 2022 08:34:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659681250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BWueao5oafEDb3+BKpe2SwU/+DhDLFIlgFlf1e9JC8s=; b=NmEjtreoYfix9WGb+k01Cm29JVuJu0wlwt2jJsTyOPXTP/k5RcAqI3RuiNTwIWezGzAn34 kyJtBdzN0lYxKpLlq/tdYysj3m8NMLvJKV7QBuRkDpL8HEmyJ1pmiFic6wGjG24vNBn78T zxS6XAx9/Fm6ie0P2alOLMRSNj7BmCc= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-21-iNEJhpX7MM66cL9FTJdpig-1; Fri, 05 Aug 2022 02:34:07 -0400 X-MC-Unique: iNEJhpX7MM66cL9FTJdpig-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B16F81857F02; Fri, 5 Aug 2022 06:34:06 +0000 (UTC) Received: from liwang-workstation.nay.redhat.com (dhcp-66-81-187.nay.redhat.com [10.66.81.187]) by smtp.corp.redhat.com (Postfix) with ESMTP id 786F41415122; Fri, 5 Aug 2022 06:34:05 +0000 (UTC) From: Li Wang To: ltp@lists.linux.it Date: Fri, 5 Aug 2022 14:34:00 +0800 Message-Id: <20220805063401.1647479-2-liwang@redhat.com> In-Reply-To: <20220805063401.1647479-1-liwang@redhat.com> References: <20220805063401.1647479-1-liwang@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Virus-Scanned: clamav-milter 0.102.4 at in-5.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-5.smtp.seeweb.it Subject: [LTP] [PATCH 1/2] lapi/pidfd: adding pidfd header file X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" The newer Glibc already provided wrapper for the series pidfd syscall, so let's include the header file conditionally. # rpm -q glibc-devel glibc-devel-2.35.9000-31.fc37.ppc64le # rpm -ql glibc-devel | grep pidfd /usr/include/sys/pidfd.h To get rid of compiling error from fedora-rawhide: tst_safe_macros.c: In function ‘safe_pidfd_open’: tst_safe_macros.c:135:16: error: implicit declaration of function ‘pidfd_open’ [-Werror=implicit-function-declaration] 135 | rval = pidfd_open(pid, flags); | ^~~~~~~~~~ Signed-off-by: Li Wang --- configure.ac | 1 + include/lapi/pidfd.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index 69b145b5f..d50ec1ea7 100644 --- a/configure.ac +++ b/configure.ac @@ -71,6 +71,7 @@ AC_CHECK_HEADERS_ONCE([ \ sys/epoll.h \ sys/fanotify.h \ sys/inotify.h \ + sys/pidfd.h sys/prctl.h \ sys/shm.h \ sys/timerfd.h \ diff --git a/include/lapi/pidfd.h b/include/lapi/pidfd.h index 244d3acaf..9ca8e5aa2 100644 --- a/include/lapi/pidfd.h +++ b/include/lapi/pidfd.h @@ -8,6 +8,9 @@ #define LAPI_PIDFD_H__ #include +#ifdef HAVE_SYS_PIDFD_H +# include +#endif #include "config.h" #include "lapi/syscalls.h"