diff options
author | Yousong Zhou <yszhou4tech@gmail.com> | 2016-09-27 15:04:41 +0800 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2016-09-29 09:29:08 +0200 |
commit | 7007975949f5177fbf2514633cc44ba0ac4712c5 (patch) | |
tree | 9a0e58e8d0c796ca83f4edfb18fd3a312f23f022 /ring.h | |
parent | 4749393697360d02b2612673473163214ff99be1 (diff) |
all: fix build on CentOS 6 by checking presence of several macros
Protect usage of macros not present in pre-3.x kernels.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'ring.h')
-rw-r--r-- | ring.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -70,7 +70,11 @@ static inline uint16_t tpacket_uhdr_vlan_proto(union tpacket_uhdr *hdr __maybe_u static inline bool tpacket_has_vlan_info(union tpacket_uhdr *hdr) { - uint32_t valid = TP_STATUS_VLAN_VALID; + uint32_t valid = 0; + +#ifdef TP_STATUS_VLAN_VALID + valid |= TP_STATUS_VLAN_VALID; +#endif #ifdef TP_STATUS_VLAN_TPID_VALID valid |= TP_STATUS_VLAN_TPID_VALID; |