Messages in this thread | | | From | Masahiro Yamada <> | Date | Mon, 29 Jul 2019 23:07:56 +0900 | Subject | Re: [PATCH] netfilter: add include guard to xt_connlabel.h |
| |
On Mon, Jul 29, 2019 at 10:15 PM Pablo Neira Ayuso <pablo@netfilter.org> wrote: > > On Mon, Jul 29, 2019 at 12:51:38AM +0900, Masahiro Yamada wrote: > > Add a header include guard just in case. > > Applied to nf.git, thanks. > > BTW, is the _UAPI_ prefix really needed? I can see netfilter headers > under include/uapi/ sometimes are prefixed by UAPI and sometimes not.
The _UAPI prefix will be useful when you happen to add the corresponding kernel-space header since it is often the case to have the same name headers for kernel-space and uapi.
For example, compare the include guards of the following.
include/linux/kernel.h include/uapi/linux/kernel.h
Or, if you want to see an example for netfilter,
include/linux/netfilter/xt_hashlimit.h include/uapi/linux/netfilter/xt_hashlimit.h
I recommend to add _UAPI prefix to headers under include/uapi/ to avoid include guard conflict.
The _UAPI prefix is ripped off by scripts/headers_install.sh when exported to user-space.
-- Best Regards Masahiro Yamada
| |