From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] eal: fix build with glibc < 2.12 Date: Thu, 26 Oct 2017 23:09:51 +0200 Message-ID: <14385227.iJrz8hiYyE@xps> References: <20171025083645.45740-1-ferruh.yigit@intel.com> <7f85550c-f992-16eb-2e41-9aae1e6813b2@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org, Ferruh Yigit To: "Gonzalez Monroy, Sergio" Return-path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 03BF61BB1E for ; Thu, 26 Oct 2017 23:09:52 +0200 (CEST) In-Reply-To: <7f85550c-f992-16eb-2e41-9aae1e6813b2@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 26/10/2017 16:05, Gonzalez Monroy, Sergio: > On 25/10/2017 09:36, Ferruh Yigit wrote: > > build error: > > CC rte_cycles.o > > cc1: warnings being treated as errors > > ...dpdk/lib/librte_eal/common/arch/x86/rte_cycles.c: In function > > =E2=80=98rdmsr=E2=80=99: > > ...dpdk/lib/librte_eal/common/arch/x86/rte_cycles.c:67:2: error: > > implicit declaration of function =E2=80=98pread=E2=80=99 > > ...dpdk/lib/librte_eal/common/arch/x86/rte_cycles.c:67:2: error: > > nested extern declaration of =E2=80=98pread=E2=80=99 > > > > from pread man page: > > pread(), pwrite(): > > _XOPEN_SOURCE >=3D 500 > > || /* Since glibc 2.12: */ _POSIX_C_SOURCE >=3D 200809L > > > > For glibc < 2.12 _XOPEN_SOURCE >=3D 500 is required. > > > > Adding _GNU_SOURCE define to the file which implies _XOPEN_SOURCE=3D700 > > > > Fixes: ad3516bb4ae1 ("eal/x86: implement arch-specific TSC freq query") > > Cc: sergio.gonzalez.monroy@intel.com > > > > Signed-off-by: Ferruh Yigit >=20 > Acked-by: Sergio Gonzalez Monroy Applied, thanks