diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-09-23 18:40:06 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-09-25 05:00:46 -0400 |
commit | 20ff1cb506727f81acba59acab8a0f37e1a13e43 (patch) | |
tree | cf299640b52ff599cc2fa36afa24ac6e7127fd9c | |
parent | acab713177377d9e0889c46bac7ff0cfb9a90c4d (diff) |
netfilter: ebtables: use __u8 instead of uint8_t in uapi header
When CONFIG_UAPI_HEADER_TEST=y, exported headers are compile-tested to
make sure they can be included from user-space.
Currently, linux/netfilter_bridge/ebtables.h is excluded from the test
coverage. To make it join the compile-test, we need to fix the build
errors attached below.
For a case like this, we decided to use __u{8,16,32,64} variable types
in this discussion:
https://lkml.org/lkml/2019/6/5/18
Build log:
CC usr/include/linux/netfilter_bridge/ebtables.h.s
In file included from <command-line>:32:0:
./usr/include/linux/netfilter_bridge/ebtables.h:126:4: error: unknown type name ‘uint8_t’
uint8_t revision;
^~~~~~~
./usr/include/linux/netfilter_bridge/ebtables.h:139:4: error: unknown type name ‘uint8_t’
uint8_t revision;
^~~~~~~
./usr/include/linux/netfilter_bridge/ebtables.h:152:4: error: unknown type name ‘uint8_t’
uint8_t revision;
^~~~~~~
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r-- | include/uapi/linux/netfilter_bridge/ebtables.h | 6 | ||||
-rw-r--r-- | usr/include/Makefile | 1 |
2 files changed, 3 insertions, 4 deletions
diff --git a/include/uapi/linux/netfilter_bridge/ebtables.h b/include/uapi/linux/netfilter_bridge/ebtables.h index 3b86c14ea49d..8076c940ffeb 100644 --- a/include/uapi/linux/netfilter_bridge/ebtables.h +++ b/include/uapi/linux/netfilter_bridge/ebtables.h | |||
@@ -123,7 +123,7 @@ struct ebt_entry_match { | |||
123 | union { | 123 | union { |
124 | struct { | 124 | struct { |
125 | char name[EBT_EXTENSION_MAXNAMELEN]; | 125 | char name[EBT_EXTENSION_MAXNAMELEN]; |
126 | uint8_t revision; | 126 | __u8 revision; |
127 | }; | 127 | }; |
128 | struct xt_match *match; | 128 | struct xt_match *match; |
129 | } u; | 129 | } u; |
@@ -136,7 +136,7 @@ struct ebt_entry_watcher { | |||
136 | union { | 136 | union { |
137 | struct { | 137 | struct { |
138 | char name[EBT_EXTENSION_MAXNAMELEN]; | 138 | char name[EBT_EXTENSION_MAXNAMELEN]; |
139 | uint8_t revision; | 139 | __u8 revision; |
140 | }; | 140 | }; |
141 | struct xt_target *watcher; | 141 | struct xt_target *watcher; |
142 | } u; | 142 | } u; |
@@ -149,7 +149,7 @@ struct ebt_entry_target { | |||
149 | union { | 149 | union { |
150 | struct { | 150 | struct { |
151 | char name[EBT_EXTENSION_MAXNAMELEN]; | 151 | char name[EBT_EXTENSION_MAXNAMELEN]; |
152 | uint8_t revision; | 152 | __u8 revision; |
153 | }; | 153 | }; |
154 | struct xt_target *target; | 154 | struct xt_target *target; |
155 | } u; | 155 | } u; |
diff --git a/usr/include/Makefile b/usr/include/Makefile index 1fb6abe29b2f..379cc5abc162 100644 --- a/usr/include/Makefile +++ b/usr/include/Makefile | |||
@@ -38,7 +38,6 @@ header-test- += linux/ivtv.h | |||
38 | header-test- += linux/jffs2.h | 38 | header-test- += linux/jffs2.h |
39 | header-test- += linux/kexec.h | 39 | header-test- += linux/kexec.h |
40 | header-test- += linux/matroxfb.h | 40 | header-test- += linux/matroxfb.h |
41 | header-test- += linux/netfilter_bridge/ebtables.h | ||
42 | header-test- += linux/netfilter_ipv4/ipt_LOG.h | 41 | header-test- += linux/netfilter_ipv4/ipt_LOG.h |
43 | header-test- += linux/netfilter_ipv6/ip6t_LOG.h | 42 | header-test- += linux/netfilter_ipv6/ip6t_LOG.h |
44 | header-test- += linux/nfc.h | 43 | header-test- += linux/nfc.h |