From 2b028bc4e5c7e9e0c0af55ac0cabdc7b51df71a7 Mon Sep 17 00:00:00 2001 From: Masayuki Ishikawa Date: Tue, 23 May 2017 15:56:33 +0900 Subject: [PATCH] netdb: Fix time info in lib_dnscache.c Signed-off-by: Masayuki Ishikawa --- libc/netdb/lib_dnscache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libc/netdb/lib_dnscache.c b/libc/netdb/lib_dnscache.c index 30cfdcd577..ee7d0e68e8 100644 --- a/libc/netdb/lib_dnscache.c +++ b/libc/netdb/lib_dnscache.c @@ -156,7 +156,7 @@ void dns_save_answer(FAR const char *hostname, #if CONFIG_NETDB_DNSCLIENT_LIFESEC > 0 /* Get the current time, using CLOCK_MONOTONIC if possible */ - (void)clock_settime(DNS_CLOCK, &now); + (void)clock_gettime(DNS_CLOCK, &now); entry->ctime = (time_t)now.tv_sec; #endif @@ -218,7 +218,7 @@ int dns_find_answer(FAR const char *hostname, FAR struct sockaddr *addr, #if CONFIG_NETDB_DNSCLIENT_LIFESEC > 0 /* Get the current time, using CLOCK_MONOTONIC if possible */ - ret = clock_settime(DNS_CLOCK, &now); + ret = clock_gettime(DNS_CLOCK, &now); #endif /* REVISIT: This is not thread safe */