[PATCH] compat.h: Add if_ether.h symbols for older kernels.

Vinson Lee <[email protected]>
Newsgroups org.kernel.vger.trinity
Message-ID <[email protected]>
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)

Signed-off-by: Vinson Lee <[email protected]>
---
 include/compat.h |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/include/compat.h b/include/compat.h
index 05b0686..2b8c285 100644
--- a/include/compat.h
+++ b/include/compat.h
@@ -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 */
-- 
1.7.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.