[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47870FA0.2010509@zytor.com>
Date: Thu, 10 Jan 2008 22:41:36 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Mike Frysinger <vapier@...too.org>
CC: David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
klibc@...or.com
Subject: Re: [klibc] [patch] import socket defines
Mike Frysinger wrote:
> On Friday 11 January 2008, David Miller wrote:
>> From: "H. Peter Anvin" <hpa@...or.com>
>>> Seems the most logical thing to do would be to break out the small
>>> portion that everyone wants into <linux/sockaddr.h> or somesuch, and
>>> then remove those ifdefs entirely.
>>>
>>> Proposed patch (still being tested) attached...
>> I think this would clearly break existing glibc builds.
>>
>> I agree with fixing the ifdef checks, but not like this.
>
> how ? the large crap in linux/socket.h never made it into glibc builds, and
> the few things at the top which were relocated to linux/sockaddr.h are still
> pulled in via linux/socket.h. for glibc, the resulting '#include
> <linux/socket.h>' should be unchanged.
The problem is that there isn't any way to do this without breaking
*something*, since the fundamental problem is that userspace doesn't ask
for what it wants, so the kernel is expected to "figure it out."
We can either change the way glibc includes the kernel headers, or the
way everything else does. The latter should really include the kernel,
although there is the hack of
/* linux/socket.h */
/* sockaddr stuff */
#ifdef __KERNEL__
# include <linux/socket2.h>
#endif
The reason I went the direction I did was that it looked like the end
result was cleaner.
-hpa
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists