From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 069FAA04C0; Mon, 28 Sep 2020 21:54:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 63F521D586; Mon, 28 Sep 2020 21:53:59 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 791A71D584; Mon, 28 Sep 2020 21:53:56 +0200 (CEST) IronPort-SDR: /Iuh7uQLkarFC6kTX7YpQWV+9t0RSqMZSrwpm1C7MYaC6E/8wnk60ZufOicG3CuqsB5guQWKiH PznSqycisTXg== X-IronPort-AV: E=McAfee;i="6000,8403,9758"; a="159432333" X-IronPort-AV: E=Sophos;i="5.77,315,1596524400"; d="scan'208,217";a="159432333" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2020 12:53:54 -0700 IronPort-SDR: A2FsmTLWkLLmZLj+tcifE2PN3JKabc7HRSRcLiQYhYzgAR6FmioP+pFP8O5MG2fS4aplyOFNRn In+W++ERCelQ== X-IronPort-AV: E=Sophos;i="5.77,315,1596524400"; d="scan'208,217";a="488737909" Received: from pkadam-mobl1.amr.corp.intel.com (HELO [10.212.36.35]) ([10.212.36.35]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2020 12:53:52 -0700 To: Dmitry Kozlyuk , dev@dpdk.org Cc: stable@dpdk.org, Khoa To , Tal Shnaiderman , Narcisa Ana Maria Vasile , Dmitry Malloy References: <20200924231707.23554-1-dmitry.kozliuk@gmail.com> From: "Kadam, Pallavi" Message-ID: <8f6dffd5-3040-9410-ecf2-3c24d2cf8d0a@intel.com> Date: Mon, 28 Sep 2020 12:53:51 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200924231707.23554-1-dmitry.kozliuk@gmail.com> Content-Language: en-GB Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] eal/windows: use bundled getopt with MinGW 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 9/24/2020 4:17 PM, Dmitry Kozlyuk wrote: > Clang builds use getopt.c in librte_eal while MinGW provides > implementation as part of the toolchain. Statically linking librte_eal > to an application that depends on getopt results in undefined reference > errors with MinGW. There are no such errors with Clang, because with > Clang librte_eal actually defines getopt functions. > > Use getopt.c in EAL with Clang and MinGW to get identical behavior. > Adjust code for MinGW. Incidentally, this removes a bug when free() is > called on uninitialized memory. > > Fixes: 5e373e456e6 ("eal/windows: add getopt implementation") > Cc: stable@dpdk.org > > Signed-off-by: Dmitry Kozlyuk > Reported-by: Khoa To > Reported-by: Tal Shnaiderman Acked-by: Pallavi Kadam >