From patchwork Wed May 5 19:12:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhou X-Patchwork-Id: 92966 X-Patchwork-Delegate: andrew.rybchenko@oktetlabs.ru Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 78FE7A0524; Wed, 5 May 2021 21:12:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B1998410FE; Wed, 5 May 2021 21:12:21 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id BC51240143; Wed, 5 May 2021 21:12:17 +0200 (CEST) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id D5CCE20B8006; Wed, 5 May 2021 12:12:16 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D5CCE20B8006 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1620241936; bh=6rpPyrvVN5tB2KGVqI9LpkrPCaITwjH1intBnfFczLI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JbTLbz6NbJZ0WwKFIoCslgNviL4zYb1FmBohTAXQndFQZ2H+w7AXx3OiPJCHz+DQr VurgBpVuiExaFXPUxobdiuMRJqgdy3/bcGiSjPVOIARnvJKMxOJC0nNWXYJr3sun6g EqMhb447OQUf0UeWxmdKyZUMyPzOqNClbqF/FsTk= From: Jie Zhou To: dev@dpdk.org Cc: dmitry.kozliuk@gmail.com, xiaoyun.li@intel.com, roretzla@microsoft.com, talshn@nvidia.com, pallavi.kadam@intel.com, thomas@monjalon.net, bruce.richardson@intel.com, ferruh.yigit@intel.com, konstantin.ananyev@intel.com, stable@dpdk.org Date: Wed, 5 May 2021 12:12:03 -0700 Message-Id: <1620241931-28435-3-git-send-email-jizh@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1620241931-28435-1-git-send-email-jizh@linux.microsoft.com> References: <1620236174-10676-1-git-send-email-jizh@linux.microsoft.com> <1620241931-28435-1-git-send-email-jizh@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v13 02/10] eal/windows: add necessary macros 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" Add required macros by testpmd on Windows in rte_os_shim.h Signed-off-by: Jie Zhou Signed-off-by: Jie Zhou Acked-by: Tal Shnaiderman --- lib/eal/windows/include/rte_os_shim.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h index 1b314733b..3763cae62 100644 --- a/lib/eal/windows/include/rte_os_shim.h +++ b/lib/eal/windows/include/rte_os_shim.h @@ -21,6 +21,7 @@ #define strdup(str) _strdup(str) #define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr) #ifndef RTE_TOOLCHAIN_GCC +#define strcasecmp _stricmp #define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count) #endif @@ -38,6 +39,14 @@ #define IPPROTO_SCTP 132 #endif +#ifndef IPDEFTTL +#define IPDEFTTL 64 +#endif + +#ifndef S_ISREG +#define S_ISREG(mode) (((mode)&S_IFMT) == S_IFREG) +#endif + #ifdef RTE_TOOLCHAIN_GCC #define TIME_UTC 1