[Olsr-dev] ok, localtime_r problems in win32 on tip

L. Aaron Kaplan (spam-protected)
Sun Feb 8 22:50:05 CET 2009


ok, I tested that out now...

we still have a link problem in win32 . seems like cygwin does not  
really actually know localtime_r(...)
I suggest that we use localtime() in win32


net.o -mno-cygwin -lws2_32 -liphlpapi
src/olsr_logging.o: In function `olsr_log':
/home/Administrator/olsrd/src/olsr_logging.c:219: undefined reference  
to `_localtime_r'
Creating library file: libolsrd.a
collect2: ld returned 1 exit status
make: *** [olsrd.exe] Error 1


I suggest to replace this by
#ifdef WIN32
   localtime ( (time_t *) &timeval );
#else
   localtime_r ( (time_t *) &timeval.tv_sec, &now );
#endif

and to adapt the code below ("now" variable).
Comments?

a.






More information about the Olsr-dev mailing list