summaryrefslogtreecommitdiffstats
path: root/meta-multimedia/recipes-multimedia/dvb-apps/files/0001-dvbdate-Remove-Obsoleted-stime-API-calls.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-multimedia/recipes-multimedia/dvb-apps/files/0001-dvbdate-Remove-Obsoleted-stime-API-calls.patch')
-rw-r--r--meta-multimedia/recipes-multimedia/dvb-apps/files/0001-dvbdate-Remove-Obsoleted-stime-API-calls.patch15
1 files changed, 5 insertions, 10 deletions
diff --git a/meta-multimedia/recipes-multimedia/dvb-apps/files/0001-dvbdate-Remove-Obsoleted-stime-API-calls.patch b/meta-multimedia/recipes-multimedia/dvb-apps/files/0001-dvbdate-Remove-Obsoleted-stime-API-calls.patch
index 9035b56f4..e89f9a3cd 100644
--- a/meta-multimedia/recipes-multimedia/dvb-apps/files/0001-dvbdate-Remove-Obsoleted-stime-API-calls.patch
+++ b/meta-multimedia/recipes-multimedia/dvb-apps/files/0001-dvbdate-Remove-Obsoleted-stime-API-calls.patch
@@ -11,22 +11,17 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
11 util/dvbdate/dvbdate.c | 5 ++++- 11 util/dvbdate/dvbdate.c | 5 ++++-
12 1 file changed, 4 insertions(+), 1 deletion(-) 12 1 file changed, 4 insertions(+), 1 deletion(-)
13 13
14diff --git a/util/dvbdate/dvbdate.c b/util/dvbdate/dvbdate.c
15index f0df437..492ed79 100644
16--- a/util/dvbdate/dvbdate.c 14--- a/util/dvbdate/dvbdate.c
17+++ b/util/dvbdate/dvbdate.c 15+++ b/util/dvbdate/dvbdate.c
18@@ -309,7 +309,10 @@ int atsc_scan_date(time_t *rx_time, unsigned int to) 16@@ -309,7 +309,10 @@ int atsc_scan_date(time_t *rx_time, unsi
19 */ 17 */
20 int set_time(time_t * new_time) 18 int set_time(time_t * new_time)
21 { 19 {
22- if (stime(new_time)) { 20- if (stime(new_time)) {
23+ struct timespec ts; 21+ struct timespec s = {0};
24+ ts.tv_sec = &new_time; 22+ s.tv_sec = *new_time;
25+ ts.tv_nsec = 0; 23+
26+ if (clock_settime(CLOCK_REALTIME, &ts)) { 24+ if (clock_settime(CLOCK_REALTIME, &s)) {
27 perror("Unable to set time"); 25 perror("Unable to set time");
28 return -1; 26 return -1;
29 } 27 }
30--
312.24.1
32