From 8d927653d7c608a1aa862d5b6afdf3ad9d8000fc Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 12 Aug 2020 12:58:58 -0700 Subject: [PATCH] lpc2list: remove deprecated functions Signed-off-by: Rosen Penev --- devel/lpc21isp/Makefile | 2 +- devel/lpc21isp/patches/110-bzero.patch | 11 +++++++++++ devel/lpc21isp/patches/120-nanosleep.patch | 12 ++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 devel/lpc21isp/patches/110-bzero.patch create mode 100644 devel/lpc21isp/patches/120-nanosleep.patch diff --git a/devel/lpc21isp/Makefile b/devel/lpc21isp/Makefile index 63ea54cd0..fbba20812 100644 --- a/devel/lpc21isp/Makefile +++ b/devel/lpc21isp/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lpc21isp PKG_VERSION:=197 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_LICENSE:=LGPL-3.0-or-later PKG_LICENSE_FILES:=README gpl.txt lgpl-3.0.txt diff --git a/devel/lpc21isp/patches/110-bzero.patch b/devel/lpc21isp/patches/110-bzero.patch new file mode 100644 index 000000000..0ae6818c3 --- /dev/null +++ b/devel/lpc21isp/patches/110-bzero.patch @@ -0,0 +1,11 @@ +--- a/lpc21isp.c ++++ b/lpc21isp.c +@@ -533,7 +533,7 @@ static void OpenSerialPort(ISP_ENVIRONMENT *IspEnvironment) + + tcgetattr(IspEnvironment->fdCom, &IspEnvironment->oldtio); /* save current port settings */ + +- bzero(&IspEnvironment->newtio, sizeof(IspEnvironment->newtio)); ++ memset(&IspEnvironment->newtio, 0, sizeof(IspEnvironment->newtio)); + IspEnvironment->newtio.c_cflag = CS8 | CLOCAL | CREAD; + + #if defined(__FreeBSD__) || defined(__OpenBSD__) diff --git a/devel/lpc21isp/patches/120-nanosleep.patch b/devel/lpc21isp/patches/120-nanosleep.patch new file mode 100644 index 000000000..02949aef8 --- /dev/null +++ b/devel/lpc21isp/patches/120-nanosleep.patch @@ -0,0 +1,12 @@ +--- a/lpc21isp.c ++++ b/lpc21isp.c +@@ -1130,7 +1130,8 @@ void ClearSerialPortBuffers(ISP_ENVIRONMENT *IspEnvironment) + */ + void Sleep(unsigned long MilliSeconds) + { +- usleep(MilliSeconds*1000); //convert to microseconds ++ struct timespec m = { MilliSeconds / 1000 , (MilliSeconds % 1000 ) * 1000 * 1000}; ++ nanosleep(&m, &m); //convert to nanoseconds + } + #endif // defined COMPILE_FOR_LINUX +