1e42b3e38SBrad BishopFrom d6817dbaf407f65dd4af12c51736153fae8b217f Mon Sep 17 00:00:00 2001 2e42b3e38SBrad BishopFrom: Khem Raj <raj.khem@gmail.com> 3e42b3e38SBrad BishopDate: Sat, 21 Dec 2019 08:36:11 -0800 4e42b3e38SBrad BishopSubject: [PATCH] dvbdate: Remove Obsoleted stime API calls 5e42b3e38SBrad Bishop 6e42b3e38SBrad Bishopstime() has been deprecated in glibc 2.31+ its recommended to 7e42b3e38SBrad Bishopreplaced with clock_settime() 8e42b3e38SBrad Bishop 9*8e7b46e2SPatrick WilliamsUpstream-Status: Pending 10e42b3e38SBrad BishopSigned-off-by: Khem Raj <raj.khem@gmail.com> 11e42b3e38SBrad Bishop--- 12e42b3e38SBrad Bishop util/dvbdate/dvbdate.c | 5 ++++- 13e42b3e38SBrad Bishop 1 file changed, 4 insertions(+), 1 deletion(-) 14e42b3e38SBrad Bishop 15e42b3e38SBrad Bishop--- a/util/dvbdate/dvbdate.c 16e42b3e38SBrad Bishop+++ b/util/dvbdate/dvbdate.c 1792b42cb3SPatrick Williams@@ -309,7 +309,10 @@ int atsc_scan_date(time_t *rx_time, unsi 18e42b3e38SBrad Bishop */ 19e42b3e38SBrad Bishop int set_time(time_t * new_time) 20e42b3e38SBrad Bishop { 21e42b3e38SBrad Bishop- if (stime(new_time)) { 2292b42cb3SPatrick Williams+ struct timespec s = {0}; 2392b42cb3SPatrick Williams+ s.tv_sec = *new_time; 2492b42cb3SPatrick Williams+ 2592b42cb3SPatrick Williams+ if (clock_settime(CLOCK_REALTIME, &s)) { 26e42b3e38SBrad Bishop perror("Unable to set time"); 27e42b3e38SBrad Bishop return -1; 28e42b3e38SBrad Bishop } 29