[OLSR-users] Re: Uolsr and uclibc

Andreas Tønnesen (spam-protected)
Sat Mar 27 02:54:11 CET 2004


Thanks for your interest in UniK olsrd!

First of all - this belongs on the olsr-users mailinglist :) So I'm 
forwarding it.

I am not familiar with uclibc so if anoyone on the list has any 
experience with it your help is appreciated.

I assume you are using UniK olsrd 0.4.0.

The lines in ipc_forntend.c that is in question all contains a calls to 
the htons(3) host to network byte-order call. htons(3) takes a 16-bit 
datatype as argument - but I'm passing a 32 bit type. As I don't have 
access to any uclibc build environments as of now I have no chance to 
chek this out - but you could try casting them to 16 bit datatypes to 
see if that helps. I cant guarantee the outcome of this - but if you do 
not plan to use the GUI front-end anyway then it shouldn't matter.

As I'm to lazy to create a patch I just past the updated code here:

   /* Different values */
   net_msg->hello_int = htons((uint16_t)hello_int);
   net_msg->hello_lan_int = htons((uint16_t)hello_int_nw);
   net_msg->tc_int = htons((uint16_t)tc_int);
   net_msg->neigh_hold = htons((uint16_t)neighbor_hold_time);
   net_msg->topology_hold = htons((uint16_t)topology_hold_time);

This replaces the lines starting at line 438 in ipc_frontend.c

regards,
Andreas T


Gilles Douillet wrote:
> Hello Andreas,
> 
> First of all, thank you for your wonderfull work on olsr.  Here in Belgium,
> I would like to setup some boxes on the top of building and then communicate
> with my firends.  We use soekris hardware (www.soekris.com) and kernel_aodv
> or olsr (but the draft version 3 from inra) with a uclibc Bering distro
> (leaf.sourceforge.net)
> 
> Now I'm writing to you (I'm not a developper only a sysadmin) because I got
> a problem compiling your olsr daemon against uclibc
> 
> The error I got is :
> 
> src/ipc_frontend.c: In function `ipc_send_net_info':
> src/ipc_frontend.c:438: invalid operands to binary >>
> src/ipc_frontend.c:438: invalid operands to binary &
> src/ipc_frontend.c:439: invalid operands to binary >>
> src/ipc_frontend.c:439: invalid operands to binary &
> src/ipc_frontend.c:440: invalid operands to binary >>
> src/ipc_frontend.c:440: invalid operands to binary &
> src/ipc_frontend.c:441: invalid operands to binary >>
> src/ipc_frontend.c:441: invalid operands to binary &
> src/ipc_frontend.c:442: invalid operands to binary >>
> src/ipc_frontend.c:442: invalid operands to binary &
> make: *** [src/ipc_frontend.o] Error 1
> 
> Can you help me to make a binary for uclibc which links staticly with
> pthread and libm from Uclibc ?
> 
> Regards,
> 
> Gilles
> 

-- 
Andreas Tønnesen((spam-protected))
UniK University Graduation Center
University of Oslo
http://www.olsr.org



More information about the Olsr-users mailing list