diff options
| -rw-r--r-- | meta-multimedia/recipes-multimedia/dvb-apps/dvb-apps_1.1.1.bb | 1 | ||||
| -rw-r--r-- | meta-multimedia/recipes-multimedia/dvb-apps/files/0001-dvbdate-Remove-Obsoleted-stime-API-calls.patch | 32 | 
2 files changed, 33 insertions, 0 deletions
| diff --git a/meta-multimedia/recipes-multimedia/dvb-apps/dvb-apps_1.1.1.bb b/meta-multimedia/recipes-multimedia/dvb-apps/dvb-apps_1.1.1.bb index 3f491181de..f354ef3872 100644 --- a/meta-multimedia/recipes-multimedia/dvb-apps/dvb-apps_1.1.1.bb +++ b/meta-multimedia/recipes-multimedia/dvb-apps/dvb-apps_1.1.1.bb | |||
| @@ -11,6 +11,7 @@ SRC_URI = "hg://linuxtv.org/hg;module=dvb-apps;protocol=http \ | |||
| 11 | file://0004-Makefile-remove-test.patch \ | 11 | file://0004-Makefile-remove-test.patch \ | 
| 12 | file://0005-libucsi-optimization-removal.patch \ | 12 | file://0005-libucsi-optimization-removal.patch \ | 
| 13 | file://0006-CA_SET_PID.patch \ | 13 | file://0006-CA_SET_PID.patch \ | 
| 14 | file://0001-dvbdate-Remove-Obsoleted-stime-API-calls.patch \ | ||
| 14 | " | 15 | " | 
| 15 | 16 | ||
| 16 | S = "${WORKDIR}/${BPN}" | 17 | S = "${WORKDIR}/${BPN}" | 
| 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 new file mode 100644 index 0000000000..9035b56f4a --- /dev/null +++ b/meta-multimedia/recipes-multimedia/dvb-apps/files/0001-dvbdate-Remove-Obsoleted-stime-API-calls.patch | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | From d6817dbaf407f65dd4af12c51736153fae8b217f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sat, 21 Dec 2019 08:36:11 -0800 | ||
| 4 | Subject: [PATCH] dvbdate: Remove Obsoleted stime API calls | ||
| 5 | |||
| 6 | stime() has been deprecated in glibc 2.31+ its recommended to | ||
| 7 | replaced with clock_settime() | ||
| 8 | |||
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 10 | --- | ||
| 11 | util/dvbdate/dvbdate.c | 5 ++++- | ||
| 12 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
| 13 | |||
| 14 | diff --git a/util/dvbdate/dvbdate.c b/util/dvbdate/dvbdate.c | ||
| 15 | index f0df437..492ed79 100644 | ||
| 16 | --- a/util/dvbdate/dvbdate.c | ||
| 17 | +++ b/util/dvbdate/dvbdate.c | ||
| 18 | @@ -309,7 +309,10 @@ int atsc_scan_date(time_t *rx_time, unsigned int to) | ||
| 19 | */ | ||
| 20 | int set_time(time_t * new_time) | ||
| 21 | { | ||
| 22 | - if (stime(new_time)) { | ||
| 23 | + struct timespec ts; | ||
| 24 | + ts.tv_sec = &new_time; | ||
| 25 | + ts.tv_nsec = 0; | ||
| 26 | + if (clock_settime(CLOCK_REALTIME, &ts)) { | ||
| 27 | perror("Unable to set time"); | ||
| 28 | return -1; | ||
| 29 | } | ||
| 30 | -- | ||
| 31 | 2.24.1 | ||
| 32 | |||
