[Olsr-dev] [PATCH v1 3/4] hna_set: explicitly cast to (time_t *) in calls to localtime()

Ferry Huberts (spam-protected)
Fri Nov 9 17:59:40 CET 2012


From: Ferry Huberts <(spam-protected)>

To make it build on win64

Signed-off-by: Ferry Huberts <(spam-protected)>
---
 src/hna_set.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/hna_set.c b/src/hna_set.c
index 71a5647..13d0dc3 100644
--- a/src/hna_set.c
+++ b/src/hna_set.c
@@ -322,7 +322,7 @@ olsr_print_hna_set(void)
   const int ipwidthprefix = olsr_cnf->ip_version == AF_INET ? (INET_ADDRSTRLEN + 1 + INET_ADDRSTRLEN - 1) : (INET6_ADDRSTRLEN + 1 + 3 - 1);
 
 	(void)gettimeofday(&now, NULL);
-  nowtm = localtime(&now.tv_sec);
+  nowtm = localtime((time_t *)&now.tv_sec);
 
   OLSR_PRINTF(1, "\n--- %02d:%02d:%02d.%02d ------------------------------------------------- HNA SET\n\n", nowtm->tm_hour,
               nowtm->tm_min, nowtm->tm_sec, (int)now.tv_usec / 10000);
-- 
1.7.11.7





More information about the Olsr-dev mailing list