AI_ADDRCONFIG once again [was: Re: svn commit: trunk/uClibc: extra/Configs include libc/inet]

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Tue Oct 21 10:30:01 UTC 2008


On Tue, Oct 21, 2008 at 10:33:14AM +0200, Ricard Wanderlof wrote:
>
> On Mon, 20 Oct 2008, Bernhard Reutner-Fischer wrote:
>
>>>
>>> -#if 0 /* unused code */
>>> +#ifdef __UCLIBC_SUPPORT_AI_ADDRCONFIG__
>>> #if __ASSUME_NETLINK_SUPPORT == 0
>>> extern smallint __no_netlink_support attribute_hidden;
>>> #else
>>> # define __no_netlink_support 0
>>> #endif
>>> -#endif /* unused code */
>>> +#endif /* __UCLIBC_SUPPORT_AI_ADDRCONFIG__ */
>>>
>>>
>>> extern int __netlink_open (struct netlink_handle *h) attribute_hidden;
>>
>> Ok, and this is also not quite right. You added an extern reference to  
>> __no_netlink_support here, where's the actual data for that symbol?
>
> Agreed, it looks weird. However, looking at the latest svn:
>
>
> #ifndef __ASSUME_NETLINK_SUPPORT
> #define __ASSUME_NETLINK_SUPPORT 1
> #endif
>
> #ifdef __UCLIBC_SUPPORT_AI_ADDRCONFIG__
> #if __ASSUME_NETLINK_SUPPORT == 0
> /* suspicious: This will simply not work.. */
> extern smallint __no_netlink_support attribute_hidden;
> #else
> # define __no_netlink_support 0
> #endif
> #endif /* __UCLIBC_SUPPORT_AI_ADDRCONFIG__ */
>
>
> it can be seen that ASSUME_NETLINK_SUPPORT is set to 1 if not previously  
> defined; in fact, this is the only place in uClibc where it is defined at 
> all. From sysdeps/unix/sysv/linux/kernel-features.h in glibc 2.7 it  
> appears that netlink support has been available in the kernel since 
> 2.4.17 . For modern kernels we can thus safely assume that netlink 
> support will always be available. So in practice, the extern line will 

yes.

> never be used. In that case it should be removed though to avoid further 
> confusion.
>
> I would therefore suggest that we simply set ASSUME_NETLINK_SUPPORT to 1  
> at all times, and remove the extern stuff. What do you think?

Please remove it, people using kernels before 2.4.17 should just turn
off netlink support manually (we could later on add a compile-time test
whether the target kernel has netlink support or not, if really needed).

TIA,



More information about the uClibc mailing list