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

Ricard Wanderlof ricard.wanderlof at axis.com
Wed Oct 22 06:48:10 UTC 2008


On Tue, 21 Oct 2008, Bernhard Reutner-Fischer wrote:

>> 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).

Something like this?

I could remove the __ASSUME_NETLINK_SUPPORT stuff completely from all 
source files, but it would make it difficult for someone who really needed 
this. On the other hand the approach below looks a bit half hearted. Could 
expand the comment I suppose.

/Ricard


Index: libc/inet/netlinkaccess.h
===================================================================
--- libc/inet/netlinkaccess.h	(revision 23748)
+++ libc/inet/netlinkaccess.h	(working copy)
@@ -53,14 +53,12 @@
  };


-#ifndef __ASSUME_NETLINK_SUPPORT
+/* Set this at all times, which is valid for kernels >= 2.4.17 */
  #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;
+# define __no_netlink_support 1
  #else
  # define __no_netlink_support 0
  #endif


--
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30



More information about the uClibc mailing list