From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 687E0A034F; Thu, 25 Feb 2021 19:23:54 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0E82A16084A; Thu, 25 Feb 2021 19:23:33 +0100 (CET) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id 54AB8160840; Thu, 25 Feb 2021 19:23:31 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id F234C5C00C5; Thu, 25 Feb 2021 13:23:30 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 25 Feb 2021 13:23:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=oUeHKLd9qA7KE nk84Ylwd5smFBY2GMDVgWeQkQjjniI=; b=YaGH9iovMO2n96hBcitlLZ6qBE9ua YvqqJMInwLMFKm5uT40MFFSM1fHzSuGOaopUsr6Yzy3dJeWH5amPjLrwTqDQ2xzw +nwepKDfiQg0y7bGNqav6sN6pPxCIuyUuk9XVKFzkuhHlGKotIkEQNYx340pWtvO 64lHcx+bx+zd4KOqDkLJ9DwhcLRecqU7DHCZgdZDBzi4e+J6fq3XZT7fPIms9RB4 OZa9uM4vZ+GRJB/bac+LE8uOOd4Zq6A3B9DFaIDWTTta+uMTQPWIqWX2Blh9i1rm dlIS5wsi3z2MzTRjuZrBFdXwgqMdJwDvKKeaCLHCR21p1kZodTzlMVedA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=oUeHKLd9qA7KEnk84Ylwd5smFBY2GMDVgWeQkQjjniI=; b=fnhKMvW1 qrROBkTh8G9goA/8X5KNHP6HUtXU6pK4CigmG1/UBZDGvX02MvG3Ess0+5agR5iO 71AO4qwO2DCnF9GnCTeHF5bLmoeKG7YO5gw69uCzh2dHmxwoiWnKO4lgxzXZkoyT 3BXI+lB/rIwV8VjS+T410BI9pJ3FrSj9H1A/VSJ/ES6GieFVszMIb4MQidYavLiW yuhBVguJIPFnTEIH86Ds3WyhKmZA03IuBiQcHBiIyUk6Pf3k97ul2w+MfxgbLWNV UUDGUdz9D1uolM/C3Nq0q0NVizVhQ3awl0quHlVZuytfgSBfQMKG8esBKFl1M5n0 1pzNRa+T+k3UIg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrkeelgdduudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepvdehgfeivdejgedtveehfefhteelfefgieevgfffveefjeegtdfg uedthedtgeevnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedvnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 1ABD224005C; Thu, 25 Feb 2021 13:23:30 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: ncopa@alpinelinux.org, stable@dpdk.org, Ferruh Yigit , Jerin Jacob , Dmitry Kozlyuk Date: Thu, 25 Feb 2021 19:22:38 +0100 Message-Id: <20210225182250.1149592-6-thomas@monjalon.net> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210225182250.1149592-1-thomas@monjalon.net> References: <20190313170657.16688-1-ncopa@alpinelinux.org> <20210225182250.1149592-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v5 05/17] eal/linux: fix build with musl X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In musl libc, cpu_set_t is defined only if _GNU_SOURCE is defined. In case _GNU_SOURCE is undefined, as in eal_common_errno.c, it was not possible to include rte_os.h which uses cpu_set_t. This limitation is removed: if _GNU_SOURCE is not defined, cpu_set_t related definitions are skipped. Note: such definitions are unneeded in eal_common_errno.c. A missing include of fcntl.h is also added. Bugzilla ID: 35 Fixes: 11b57c698005 ("eal: fix error string function") Fixes: 176bb37ca6f3 ("eal: introduce internal wrappers for file operations") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon Signed-off-by: Natanael Copa --- lib/librte_eal/linux/include/rte_os.h | 2 ++ lib/librte_eal/unix/eal_file.c | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/librte_eal/linux/include/rte_os.h b/lib/librte_eal/linux/include/rte_os.h index 390b87b3a1..f3f9982f40 100644 --- a/lib/librte_eal/linux/include/rte_os.h +++ b/lib/librte_eal/linux/include/rte_os.h @@ -12,6 +12,7 @@ #include +#ifdef _GNU_SOURCE typedef cpu_set_t rte_cpuset_t; #define RTE_CPU_AND(dst, src1, src2) CPU_AND(dst, src1, src2) #define RTE_CPU_OR(dst, src1, src2) CPU_OR(dst, src1, src2) @@ -28,5 +29,6 @@ typedef cpu_set_t rte_cpuset_t; RTE_CPU_FILL(&tmp); \ CPU_XOR(dst, &tmp, src); \ } while (0) +#endif #endif /* _RTE_OS_H_ */ diff --git a/lib/librte_eal/unix/eal_file.c b/lib/librte_eal/unix/eal_file.c index 1b26475ba4..ec554e0096 100644 --- a/lib/librte_eal/unix/eal_file.c +++ b/lib/librte_eal/unix/eal_file.c @@ -4,6 +4,7 @@ #include #include +#include #include #include -- 2.30.1