From ae90406453eb894400a25e0557bb2c7bf19f06a4 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 7 Aug 2013 02:05:53 +0200 Subject: Define ethhdr when it is not available --- src/compat.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') diff --git a/src/compat.h b/src/compat.h index e127dba..6afcbad 100644 --- a/src/compat.h +++ b/src/compat.h @@ -27,6 +27,11 @@ #ifndef _FASTD_COMPAT_H_ #define _FASTD_COMPAT_H_ +#include + +#include + + #ifndef ETH_ALEN #define ETH_ALEN 6 #endif @@ -35,4 +40,12 @@ #define ETH_HLEN 14 #endif +#ifndef HAVE_ETHHDR +struct ethhdr { + uint8_t h_dest[ETH_ALEN]; + uint8_t h_source[ETH_ALEN]; + uint16_t h_proto; +} __attribute__((packed)); +#endif + #endif /* _FASTD_COMPAT_H_ */ -- cgit v1.2.3