On Thu, Jan 17, 2013 at 2:59 AM, David Miller <span dir="ltr"><<a href="mailto:davem@davemloft.net" target="_blank">davem@davemloft.net</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><br>
</div>When GLIBC doesn't provide it's own definition of some networking<br>
macros or interfaces that the kernel provides, people include the<br>
kernel header.<br></blockquote><div><br></div><div>Recently I got a problem when copying a structure from kernel to userspace, after debugging I found:</div><div><br></div><div>kernel: <span style="color:rgb(34,34,34);font-size:13px;white-space:nowrap;font-family:arial,sans-serif"> </span> include/linux/inet.h</div>

<div><br></div><div>#define INET6_ADDRSTRLEN        (48)</div><div><br></div><div>glibc:  /usr/include/netinet/in.h</div><div><br></div><div><font color="#222222" face="arial, sans-serif"><span style="white-space:nowrap">#define INET6_ADDRSTRLEN 46</span></font></div>

</div><div><br></div><div><br></div><div>Any reason to differentiate them from each other?</div><div><br></div>-- <br>Thanks,<br>Jike