ena: fix FreeBSD build
authorDaniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Tue, 29 Mar 2016 12:43:54 +0000 (14:43 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 30 Mar 2016 17:22:17 +0000 (19:22 +0200)
FreeBSD was not defined in ena_plat.h
ETIME is not defined in FreeBSD.

In file included from DPDK/drivers/net/ena/base/ena_com.h:37:0,
                 from DPDK/drivers/net/ena/ena_ethdev.h:39,
                 from DPDK/drivers/net/ena/ena_ethdev.c:41:
DPDK/drivers/net/ena/base/ena_plat.h:48:2: error: #error "Invalid platform"

Fixes: 99ecfbf845b3 ("ena: import communication layer")
Fixes: 9ba7981ec992 ("ena: add communication layer for DPDK")

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
drivers/net/ena/base/ena_plat.h
drivers/net/ena/base/ena_plat_dpdk.h

index 278175f..b5b6454 100644 (file)
@@ -42,6 +42,8 @@
 #else
 #include "ena_plat_dpdk.h"
 #endif
+#elif defined(__FreeBSD__)
+#include "ena_plat_dpdk.h"
 #elif defined(_WIN32)
 #include "ena_plat_windows.h"
 #else
index e245e34..aab2ac8 100644 (file)
@@ -57,6 +57,9 @@ typedef uint16_t u16;
 typedef uint8_t u8;
 
 typedef uint64_t dma_addr_t;
+#ifndef ETIME
+#define ETIME ETIMEDOUT
+#endif
 
 #define ena_atomic32_t rte_atomic32_t
 #define ena_mem_handle_t void *