Skip to contentSkip to conversation

compat.h: Add if_ether.h symbols for older kernels.

PATCH New Vinson Lee 1 participant 1 message Oct 19, 2013

lore
Share & tools
lore

Vinson Lee

author
#0 lore raw

PATCH 1/1 compat.h: Add if_ether.h symbols for older kernels.

From: Vinson Lee <[email protected]>

This patch fixes these build errors on CentOS 6.

CC net/ether.o
net/ether.c:12: error: ‘ETH_P_BATMAN’ undeclared here (not in a function) net/ether.c:19: error: ‘ETH_P_LINK_CTL’ undeclared here (not in a function) net/ether.c:21: error: ‘ETH_P_8021AD’ undeclared here (not in a function) net/ether.c:21: error: ‘ETH_P_802_EX1’ undeclared here (not in a function) net/ether.c:22: error: ‘ETH_P_8021AH’ undeclared here (not in a function) net/ether.c:22: error: ‘ETH_P_MVRP’ undeclared here (not in a function) net/ether.c:23: error: ‘ETH_P_QINQ1’ undeclared here (not in a function) net/ether.c:24: error: ‘ETH_P_QINQ2’ undeclared here (not in a function) net/ether.c:24: error: ‘ETH_P_QINQ3’ undeclared here (not in a function) net/ether.c:31: error: ‘ETH_P_CANFD’ undeclared here (not in a function) net/ether.c:34: error: ‘ETH_P_CAIF’ undeclared here (not in a function)

---
 include/compat.h |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)
include/compat.h +33 -0
index 05b0686..2b8c285 100644
@@ -790,8 +790,41 @@ struct kvm_get_htab_fd {
 #endif
 
 /* if_ether.h */
+#ifndef ETH_P_BATMAN
+#define ETH_P_BATMAN	0x4305
+#endif
+#ifndef ETH_P_LINK_CTL
+#define ETH_P_LINK_CTL	0x886c
+#endif
+#ifndef ETH_P_8021AD
+#define ETH_P_8021AD	0x88A8
+#endif
+#ifndef ETH_P_802_EX1
+#define ETH_P_802_EX1	0x88B5
+#endif
+#ifndef ETH_P_8021AH
+#define ETH_P_8021AH	0x88E7
+#endif
+#ifndef ETH_P_MVRP
+#define ETH_P_MVRP	0x88F5
+#endif
+#ifndef ETH_P_QINQ1
+#define ETH_P_QINQ1	0x9100
+#endif
+#ifndef ETH_P_QINQ2
+#define ETH_P_QINQ2	0x9200
+#endif
+#ifndef ETH_P_QINQ3
+#define ETH_P_QINQ3	0x9300
+#endif
 #ifndef ETH_P_802_3_MIN
 #define ETH_P_802_3_MIN	0x0600
 #endif
+#ifndef ETH_P_CANFD
+#define ETH_P_CANFD	0x000D
+#endif
+#ifndef ETH_P_CAIF
+#define ETH_P_CAIF	0x00F7
+#endif
 
 #endif	/* _TRINITY_COMPAT_H */
Signature · 1 line
1.7.1