[squid-dev] [PATCH] Fix broken cross-include guards in Linux Netfilter code
Kinkie
gkinkie at gmail.com
Tue Sep 22 10:00:27 UTC 2015
Hello,
recent Linux kernels have a new behavior, by which linux/in.h
defines some symbols which are also defined in netinet/in.h. This is
currently causing broken builds on redhat rawhide, but others will
follow for sure.
The Linux developers have included some cross-include guards (in
linux/libc-compat.h); problem is, they are currently not working for
us.
The reason for this failure is in this include chain:
- compat/os/linux.h includes linux/capability.h which which includes
libc-compat.h.
libc-compat.h looks for the include-guards of _NETINET_IN_H, which are
not (yet) defined to define a macro preventing redefinnition of the
symbols
- later on, we include netinet/in.h
- later on, we include linux/if.h which includes linux/in.h
The attached patch #undef-s the linux/libc-compat.h include guards
before including any linux/*.h header but after including
netinet/in.h; this causes libc-compat.h to be reevaluated and the
correct guards to be defined.
It's a hack, but it's proven working. The long route would probably
have to be to rework compat/os/linux which I'm quite wary of.
Opinions?
--
Francesco
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-broken-in-h-cross-detection.patch
Type: text/x-diff
Size: 493 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20150922/b6663698/attachment.patch>
More information about the squid-dev
mailing list