lpc2list: remove deprecated functions
authorRosen Penev <redacted>
Wed, 12 Aug 2020 19:58:58 +0000 (12:58 -0700)
committerRosen Penev <redacted>
Fri, 14 Aug 2020 20:49:36 +0000 (13:49 -0700)
Signed-off-by: Rosen Penev <redacted>
devel/lpc21isp/Makefile
devel/lpc21isp/patches/110-bzero.patch [new file with mode: 0644]
devel/lpc21isp/patches/120-nanosleep.patch [new file with mode: 0644]

index 63ea54cd02f955c1b72a38295a31233d78ad73c7..fbba208123f67a8c76f9602b75d85036ee0ee74e 100644 (file)
@@ -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 (file)
index 0000000..0ae6818
--- /dev/null
@@ -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 (file)
index 0000000..02949ae
--- /dev/null
@@ -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
git clone https://git.99rst.org/PROJECT