<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Petr,</div></div><div class="gmail_quote"><div> </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> > See: <a href="https://www.mail-archive.com/netdev@vger.kernel.org/msg132711.html" rel="noreferrer" target="_blank">https://www.mail-archive.com/netdev@vger.kernel.org/msg132711.html</a><br>
<br>
> Thanks for fixing it, it's not a first time we got hit by this.<br>
> I wonder where <linux/in.h> is included. It's not directly in setsockopt08.c,<br>
> it must be in our lapi header. But it's not in tst_safe_net.h, not in<br>
> safe_net_fn.h nor in tst_net.h and both actually include <netinet/in.h>, thus it must be<br>
> before. But there is only tst_test.h.<br>
<br>
> I'm asking because it'd be better to add <netinet/in.h> into header before<br>
> <linux/in.h>.<br>
<br>
OK, it's in lapi/ip_tables.h, which includes <linux/netfilter_ipv4/ip_tables.h><br>
which includes <linux/if.h>. But I wonder why inclusion of <netinet/in.h> from<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">No, it's not caused by the lapi/ip_tables.h which finally includes <linux/if.h>.</div><div class="gmail_default" style="font-size:small">See experiment commit: </div><div class="gmail_default" style="font-size:small"><a href="https://github.com/wangli5665/ltp/commit/f1a37712c63472b19d3355446fb66e651b4a186e">https://github.com/wangli5665/ltp/commit/f1a37712c63472b19d3355446fb66e651b4a186e</a></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The conflict happened early in tst_test.h and I guess some header files</div><div class="gmail_default" style="font-size:small">between line#14 to line#44 probably involves <linux/if.h>, but I'm not sure</div><div class="gmail_default" style="font-size:small">which one is the culprit.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If we simply put the <span class="gmail_default"></span><netinet/in.h><span class="gmail_default"> at the top of tst_test.h, the conflict </span>disappears as well.</div><div class="gmail_default" style="font-size:small">See experiment commit:</div><div class="gmail_default" style="font-size:small"><a href="https://github.com/wangli5665/ltp/commit/0155df479811d9a51f30e09accb330238607f73d">https://github.com/wangli5665/ltp/commit/0155df479811d9a51f30e09accb330238607f73d<br></a></div><br></div><div><div class="gmail_default" style="font-size:small">$ cat include/tst_test.h -n</div><span class="gmail_default" style="font-size:small">...</span><br> 14 #include <unistd.h><br> 15 #include <limits.h><br> 16 #include <string.h><br> 17 #include <errno.h><br> 18 <br> 19 #include "tst_common.h"<br> 20 #include "tst_res_flags.h"<br> 21 #include "tst_test_macros.h"<br> 22 #include "tst_checkpoint.h"<br> 23 #include "tst_device.h"<br> 24 #include "tst_mkfs.h"<br> 25 #include "tst_fs.h"<br> 26 #include "tst_pid.h"<br> 27 #include "tst_cmd.h"<br> 28 #include "tst_cpu.h"<br> 29 #include "tst_process_state.h"<br> 30 #include "tst_atomic.h"<br> 31 #include "tst_kvercmp.h"<br> 32 #include "tst_kernel.h"<br> 33 #include "tst_minmax.h"<br> 34 #include "tst_get_bad_addr.h"<br> 35 #include "tst_path_has_mnt_flags.h"<br> 36 #include "tst_sys_conf.h"<br> 37 #include "tst_coredump.h"<br> 38 #include "tst_buffers.h"<br> 39 #include "tst_capability.h"<br> 40 #include "tst_hugepage.h"<br> 41 #include "tst_assert.h"<br> 42 #include "tst_lockdown.h"<br> 43 #include "tst_fips.h"<br> 44 #include "tst_taint.h"<br><div class="gmail_default" style="font-size:small">...</div> 93 #include "tst_safe_macros.h"<br> 94 #include "tst_safe_file_ops.h"<br> 95 #include "tst_safe_net.h"<span class="gmail_default" style="font-size:small"> <===== includes the </span><netinet/in.h><span class="gmail_default" style="font-size:small"> here</span><br> 96 #include "tst_clone.h"<br><div class="gmail_default" style="font-size:small"></div></div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>