From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id AE672A0A0C;
	Tue, 29 Jun 2021 22:23:59 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 1457C411FB;
	Tue, 29 Jun 2021 22:23:55 +0200 (CEST)
Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182])
 by mails.dpdk.org (Postfix) with ESMTP id EEBA2411E9;
 Tue, 29 Jun 2021 22:23:51 +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 4190D20B6C50;
 Tue, 29 Jun 2021 13:23:51 -0700 (PDT)
DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4190D20B6C50
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;
 s=default; t=1624998231;
 bh=/DzyZOhGaAM74Gz6NauOmkq6OTP/UizNsvbtebev9fs=;
 h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
 b=E/w106iu14MbjpHeii2fdqFfghDSk8qSsHVuMBKe65J4f1ekZq5tZsSsglvZD/jCn
 lpzRnLuOTFS7Nk1qKSo6pkyyy7Jpyg8RldS9hDm12acASwLzrGccDe0c9kBT5ctdJH
 Pgl7PuIAQhIn6xcgvutdwzR4DQvTo2CraUIPJQJc=
From: Jie Zhou <jizh@linux.microsoft.com>
To: dev@dpdk.org
Cc: dmitry.kozliuk@gmail.com, xiaoyun.li@intel.com, roretzla@microsoft.com,
 talshn@nvidia.com, pallavi.kadam@intel.com, andrew.rybchenko@oktetlabs.ru,
 thomas@monjalon.net, bruce.richardson@intel.com, ferruh.yigit@intel.com,
 konstantin.ananyev@intel.com, stable@dpdk.org
Date: Tue, 29 Jun 2021 13:23:39 -0700
Message-Id: <1624998226-12220-3-git-send-email-jizh@linux.microsoft.com>
X-Mailer: git-send-email 1.8.3.1
In-Reply-To: <1624998226-12220-1-git-send-email-jizh@linux.microsoft.com>
References: <1624487698-31136-1-git-send-email-jizh@linux.microsoft.com>
 <1624998226-12220-1-git-send-email-jizh@linux.microsoft.com>
Subject: [dpdk-dev] [PATCH v15 2/9] eal/windows: add necessary macros
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

Add required macros by testpmd on Windows in rte_os_shim.h

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 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 1b314733b2..824d9748ba 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(s1, s2) _stricmp(s1, s2)
 #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
-- 
2.31.0.vfs.0.1