fix problem on OS X: no packets where sent out. Because the timers did not trigger because olsr_times() returned 0 all the time. Why is this so? Because if you look at the BSD man pages of times(3) it will return the number of ticks since the epoche and not since booting. Therefore the values are higher than the -1 of a singed long. Therefore -erro was being returned. And errno was 0 all the time. This seems to be a very strange problem in OS X: for some time the FreeBSD man page was wrong. But FreeBSD actually returns the real uptime in clock ticks. But OS X actually returns the clock ticks since the epoche.
fix problem on OS X: no packets where sent out.
Because the timers did not trigger because olsr_times() returned 0 all the time.
Why is this so?
Because if you look at the BSD man pages of times(3) it will return the number of ticks since the epoche and not since booting.
Therefore the values are higher than the -1 of a singed long. Therefore -erro was being returned. And errno was 0 all the time.
This seems to be a very strange problem in OS X: for some time the FreeBSD man page was wrong. But FreeBSD actually returns the real uptime in clock ticks. But OS X actually returns the clock ticks since the epoche.

The fix makes the following: compare properly against the clock_t type (which is a unsigned long).
This way, nothing can go wrong in any case.

Cudos and and thanks for Henning Rogge for thinking this thru with me.
Reference to the FreeBSD man page for times(3):  http://www.freebsd.org/cgi/query-pr.cgi?pr=122359


TIMES(3)                 BSD Library Functions Manual                 TIMES(3)

NAME
     times -- process times

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     #include <sys/times.h>

     clock_t
     times(struct tms *buffer);

DESCRIPTION
     This interface is obsoleted by getrusage(2) and gettimeofday(2).

     The times() function returns the value of time in CLK_TCK's of a second since 0 hours, 0 minutes, 0 seconds, January 1, 1970,
     Coordinated Universal Time.

servalproject/olsr,duydb2/olsr,brabander/olsr,tdz/olsrd,zioproto/olsrd,sebkur/olsrd,ralisi/olsrd_cl_roam,zioproto/olsrd,acinonyx/olsrd,nolith/olsrd,cholin/olsrd,servalproject/olsr,diogomg/olsrd-binary-heap,diogomg/olsrd,diogomg/olsrd-binary-heap,ninuxorg/olsrd,diogomg/olsrd-binary-heap,ninuxorg/olsrd,nolith/olsrd,sebkur/olsrd,ninuxorg/olsrd,sebkur/olsrd,brabander/olsr,cholin/olsrd,duydb2/olsr,nolith/olsrd,brabander/olsr,tdz/olsrd,brabander/olsr,tdz/olsrd,diogomg/olsrd-binary-heap,duydb2/olsr,duydb2/olsr,acinonyx/olsrd,sebkur/olsrd,diogomg/olsrd,acinonyx/olsrd,ralisi/olsrd_cl_roam,acinonyx/olsrd,sebkur/olsrd,ralisi/olsrd_cl_roam,ninuxorg/olsrd,duydb2/olsr,duydb2/olsr,diogomg/olsrd,cholin/olsrd,servalproject/olsr,diogomg/olsrd,cholin/olsrd,zioproto/olsrd,diogomg/olsrd-binary-heap,servalproject/olsr,diogomg/olsrd,tdz/olsrd,sebkur/olsrd,ralisi/olsrd_cl_roam,ninuxorg/olsrd,zioproto/olsrd,nolith/olsrd,servalproject/olsr,tdz/olsrd,servalproject/olsr,acinonyx/olsrd,cholin/olsrd,diogomg/olsrd,duydb2/olsr,zioproto/olsrd,diogomg/olsrd-binary-heap,diogomg/olsrd,nolith/olsrd,diogomg/olsrd-binary-heap,duydb2/olsr