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 F246B5B1E for ; Fri, 2 Nov 2018 10:41:27 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 87C75221D8; Fri, 2 Nov 2018 05:41:27 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 02 Nov 2018 05:41:27 -0400 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=2ParaF691ovEzkOSdWsS3EvuMkL34qxZPIg5eJteaBU=; b=iEjD8ZisWTIB xuPk8kjUEeyIdDx/WJ0d5OE9YDmPamA+Y4lanpsyy20FxItm/FbgiQne0PTNwGhV y/Y0pQsOZ2w7tAJV+ZiHLgv0W7c/SAoKmHHoPlj6n8qb9A1Jd8ANSfccheA98KZK H5Ia81nwS9tyeT5J7lsEF/HR5KttI6g= 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=2ParaF691ovEzkOSdWsS3EvuMkL34qxZPIg5eJtea BU=; b=Qf84IxV3hNmX1Ii8uViM/4m3OS8SWO3Yeh7HhnVutXHqo9tbe3jSzm6yW OXbfU/ag/ipizWGgjjgNGqaYV/aaVRTSym+eU0cTHCMX3VIydto/B5imCuuEMOw3 IoE/Ia8pjVaCDudQRasRvpAP97NuFWZAUeTRPl8HBrlyklYgBDzxG/mKMW6huppq 5VF+obAgsCe3sjrM9Dlmfg7qAYmwRpTgikGCsRJDwDRYmhYAD/1atJVKNdJgjzCV qY3T0/pC0GJA9fJgyGmhfnxy9lzy4K/B54ZfAIgGqsY//cSdHI+Amj/tnpu4tpHr u8RMGOSH0s6vlhLYL3SS06jcvtzzA== 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 55829E454E; Fri, 2 Nov 2018 05:41:26 -0400 (EDT) From: Thomas Monjalon To: Jerin Jacob Cc: "dev@dpdk.org" , "anatoly.burakov@intel.com" , "Jacob, Jerin" , ferruh.yigit@intel.com Date: Fri, 02 Nov 2018 10:41:24 +0100 Message-ID: <1877297.2k9xseoUcZ@xps> In-Reply-To: <20181102081059.8096-1-jerin.jacob@caviumnetworks.com> References: <20181102081059.8096-1-jerin.jacob@caviumnetworks.com> 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: Fri, 02 Nov 2018 09:41:28 -0000 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/