missing: support old linux/fou.h

linux/fou.h was introduced in 3.18.
FOU_ATTR_REMCSUM_NOPARTIAL was added in 4.0.
FOU_CMD_GET was added in 4.1.

Follow-up for 53cb501a13.
Fixes #10474.
This commit is contained in:
Yu Watanabe
2018-10-21 22:34:28 +09:00
parent a2689fa5fc
commit 80df8f2518
5 changed files with 33 additions and 26 deletions
+26 -20
View File
@@ -1417,33 +1417,39 @@ struct statx {
#define FOU_GENL_VERSION 0x1
#endif
#if !HAVE_LINUX_FOU_H
#define FOU_ATTR_UNSPEC 0
#define FOU_ATTR_PORT 1
#define FOU_ATTR_AF 2
#define FOU_ATTR_IPPROTO 3
#define FOU_ATTR_TYPE 4
#endif
#if !HAVE_FOU_ATTR_REMCSUM_NOPARTIAL
#define FOU_ATTR_UNSPEC 0
#define FOU_ATTR_PORT 1
#define FOU_ATTR_AF 2
#define FOU_ATTR_IPPROTO 3
#define FOU_ATTR_TYPE 4
#define FOU_ATTR_REMCSUM_NOPARTIAL 5
#define __FOU_ATTR_MAX 6
#define FOU_ATTR_MAX (__FOU_ATTR_MAX - 1)
#undef FOU_ATTR_MAX
#endif
#ifndef FOU_ATTR_MAX
#define FOU_ATTR_MAX 5
#endif
#if !HAVE_LINUX_FOU_H
#define FOU_CMD_UNSPEC 0
#define FOU_CMD_ADD 1
#define FOU_CMD_DEL 2
#endif
#if !HAVE_FOU_CMD_GET
#define FOU_CMD_UNSPEC 0
#define FOU_CMD_ADD 1
#define FOU_CMD_DEL 2
#define FOU_CMD_GET 3
#define __FOU_CMD_MAX 4
#define FOU_CMD_MAX (__FOU_CMD_MAX - 1)
#define FOU_CMD_GET 3
#undef FOU_CMD_MAX
#endif
#ifndef FOU_CMD_MAX
#define FOU_CMD_MAX 3
#endif
#if !HAVE_FOU_ENCAP_GUE
#define FOU_ENCAP_UNSPEC 0
#define FOU_ENCAP_DIRECT 1
#define FOU_ENCAP_GUE 2
#define __FOU_ENCAP_MAX 3
#if !HAVE_LINUX_FOU_H
#define FOU_ENCAP_UNSPEC 0
#define FOU_ENCAP_DIRECT 1
#define FOU_ENCAP_GUE 2
#define __FOU_ENCAP_MAX 3
#define FOU_ENCAP_MAX (__FOU_ENCAP_MAX - 1)
#endif