]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_eal/windows/include/rte_os.h
pci: keep API compatibility with mmap values
[dpdk.git] / lib / librte_eal / windows / include / rte_os.h
index cb10d6494f9494f4625e8d6b1e6b6b6dde3d096d..2881bf2224e506933f35bb82d2365573b53b65d7 100644 (file)
@@ -25,6 +25,14 @@ extern "C" {
 #define PATH_MAX _MAX_PATH
 #endif
 
+/* sys/mman.h
+ * The syscall mmap does not exist on Windows,
+ * but this error code is used in a badly defined DPDK API for PCI mapping.
+ */
+#define MAP_FAILED ((void *) -1)
+
+#define sleep(x) Sleep(1000 * (x))
+
 #define strerror_r(a, b, c) strerror_s(b, c, a)
 
 /* strdup is deprecated in Microsoft libc and _strdup is preferred */