[Olsr-dev] Problem with compile olsrd on SDK AirmaxOS

Henning Rogge (spam-protected)
Mon Nov 10 15:01:10 CET 2014


On Mon, Nov 10, 2014 at 2:56 PM, Ferry Huberts <(spam-protected)> wrote:
>
>
> On 10/11/14 14:03, Henning Rogge wrote:
>>
>> The patches look reasonable, they should not be a problem with the
>> current kernels.
>>
>> Ferry, do you see a problem with these changes?
>
>
>
> mmm, I guess I do.
> Didn't we already have some kernel version detection somewhere?
> I'd rather use something like that.
>
> Ah, found it, see olsrd_conf.c line 544 for an example:
>
>> #if !defined LINUX_VERSION_CODE || !defined KERNEL_VERSION
>> #error "Both LINUX_VERSION_CODE and KERNEL_VERSION need to be defined"
>> #else /* !defined LINUX_VERSION_CODE || !defined KERNEL_VERSION */
>> #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
>>   if (cnf->ip_version == AF_INET6 && cnf->smart_gw_active) {
>>     fprintf(stderr, "Smart gateways are not supported for linux kernel <
>> 2.6.24 and ipv6\n");
>>     return -1;
>>   }
>> #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) */

Unfortunately we cannot use this kind of detection in the
"non-linux-specifc" parts of the code.

Henning Rogge




More information about the Olsr-dev mailing list