pcap: fix build when pcap_sendpacket is unavailable
[dpdk.git] / lib / librte_pmd_pcap / rte_eth_pcap.h
index 7ed68b1..c45f4a1 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  * 
- *   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
  *   All rights reserved.
  * 
  *   Redistribution and use in source and binary forms, with or without
 #ifdef __cplusplus
 extern "C" {
 #endif
-#include <pcap/pcap.h>
+#include <pcap.h>
+
+#ifdef pcap_sendpacket
+#define PCAP_CAN_SEND
+#else
+#undef PCAP_CAN_SEND
+#endif
 
 #define RTE_ETH_PCAP_PARAM_NAME "eth_pcap"