summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-08-07 02:05:53 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-08-07 02:05:53 +0200
commitae90406453eb894400a25e0557bb2c7bf19f06a4 (patch)
treebedaba40edce82382887efb0850c3732d3e91165 /src
parent8f12f0c3b2f50e5356c026f646bc5003369b3014 (diff)
downloadfastd-ae90406453eb894400a25e0557bb2c7bf19f06a4.tar
fastd-ae90406453eb894400a25e0557bb2c7bf19f06a4.zip
Define ethhdr when it is not available
Diffstat (limited to 'src')
-rw-r--r--src/compat.h13
1 files changed, 13 insertions, 0 deletions
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 <config.h>
+
+#include <stdint.h>
+
+
#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_ */