Hi,

On Tue, Oct 11, 2011 at 8:00 AM, Dimitry Andric <d...@freebsd.org> wrote:
> On 2011-10-09 19:32, Larry Rosenman wrote:
>>
>> I had gotten a PR about sysutils/lsof not compiling with clang.  I had
>> Vic Abell check it out, and the problem is NOT with lsof per se, but
>> with the system headers.
>>
>> Is there a project afoot to update the system headers to make them clang
>> compilable?
>
> The problem isn't that clang can't compile the system headers, but
> normally these don't get included from userspace.  And they certainly
> won't work as expected when you define _KERNEL in userspace, as the lsof
> port foolishly does.  It probably can't be avoided in such a tool, though.
>
#ifdef _KERNEL/#endif protected part of system headers shall NEVER be
accessed by userland. It is a fault to have them present in
/usr/include. Linux got it right there, all those part are removed
upon headers' installation.

 - Arnaud
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to