From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 180652082 for ; Sun, 4 Nov 2018 22:22:19 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id AE38721BF4; Sun, 4 Nov 2018 16:22:18 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 04 Nov 2018 16:22:18 -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:content-type; s=mesmtp; bh=wJMoVQfR/zxeCpFOdk0hGnTkaVKgOZdX1Fw8qKnro0Y=; b=IGyBmCpcvJWl T5heMOn7p/Pd/PWlOSw1lCBE+TeD+n/7c7ZiYXEDScVa4oMZDUEDE8whZCregXpn 9T7466DwTCqKnGTEdUaFfzJpVzfBQtX+aSuQ7FnstJBfvjQfh+KqIEBa4lx6c8T9 9mkHDwZD1e+ImiUX8annxGUiFZDmd5E= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :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=fm1; bh=wJMoVQfR/zxeCpFOdk0hGnTkaVKgOZdX1Fw8qKnro 0Y=; b=NzxFiK9HKMNYpJ+MFVOKzeuqGmkE3EzEE/SYyQrSY+/TC/8ELOkqg5CYg ZE5CFyJ6GbT3SY205nVoTVO+r8Q9G5QwinFhh4fcerZky7HBEYPkUgSOuET0ftwN Y+HWNzT4i0ugmmNALNjFO6syETqXmzEH5qDQBvcukgy1k66/WsmtEEI0IKkx8Mdz VGcvjdtk6v8+VGghjrrAfFHF7bNqFLhxsCS3kEScJyW00t4t6ACUDUcUB8jZsdbA eiAtE/wRxDmkzvP54e21MJnIB0Lb7N6SkionC3A9n1uRedOx21Y5kw/Km/0Af/PE u77EPKGZXUS2BFiYF9g7DmL2M14Lw== X-ME-Sender: X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 4A00F102E8; Sun, 4 Nov 2018 16:22:17 -0500 (EST) From: Thomas Monjalon To: Jerin Jacob Cc: dev@dpdk.org, Ferruh Yigit , "anatoly.burakov@intel.com" , "Jacob, Jerin" Date: Sun, 04 Nov 2018 22:22:16 +0100 Message-ID: <7194051.gyhe4j6Bix@xps> In-Reply-To: References: <20181102081059.8096-1-jerin.jacob@caviumnetworks.com> <1877297.2k9xseoUcZ@xps> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] eal: fix broken rte strerror X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Nov 2018 21:22:19 -0000 02/11/2018 18:20, Ferruh Yigit: > On 11/2/2018 9:41 AM, Thomas Monjalon wrote: > > 02/11/2018 09:11, Jerin Jacob: > >> errno_autotest testcase were failed since > >> commit 5d7b673d5fd6 ("mk: build with _GNU_SOURCE defined by default") > >> RTE>>errno_autotest > >> rte_strerror: 'Unknown error 11', > >> strerror: 'Resource temporarily unavailable' > >> Test Failed > >> > >> There are two different version of strerror_t() based on > >> _GNU_SOURCE definition. > >> > >> /* XSI-compliant */ > >> int strerror_r(int errnum, char *buf, size_t buflen); > >> > >> /* GNU-specific */ > >> char *strerror_r(int errnum, char *buf, size_t buflen); > >> > >> Since the GNU-specific version returns char* the exiting "if" > >> condition around the strerror_r fails. > >> > >> Switching back to XSI-compliant version to allow > >> > >> a) Portable strerror_r() usage as musl c library uses > >> non GNU speficic version > >> https://git.musl-libc.org/cgit/musl/tree/src/string/strerror_r.c > >> > >> b) Based on strerror_r(3) man page, it is possible that GNU-specific > >> version need not use char *buf to fill error message instead it > >> can use the immutable static string from the library and return it. > >> > >> note from strerror_r(3) man page: > >> > >> The GNU-specific strerror_r() returns a pointer to a string containing > >> the error message. This may be either a pointer to a string that the > >> function stores in buf, or a pointer to some (immutable) > >> static string (in which case buf is unused). > >> > >> Fixes: 5d7b673d5fd6 ("mk: build with _GNU_SOURCE defined by default") > >> > >> Signed-off-by: Jerin Jacob > > > > You may be interested by this patch from Ferruh: > > https://patches.dpdk.org/patch/47622/ > > Reviewed-by: Ferruh Yigit Applied, thanks