Browse Source

Merge pull request #13119 from neheb/lpc

lpc2list: remove deprecated functions
lilik-openwrt-22.03
Rosen Penev 4 years ago
committed by GitHub
parent
commit
38c92b745a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 1 deletions
  1. +1
    -1
      devel/lpc21isp/Makefile
  2. +11
    -0
      devel/lpc21isp/patches/110-bzero.patch
  3. +12
    -0
      devel/lpc21isp/patches/120-nanosleep.patch

+ 1
- 1
devel/lpc21isp/Makefile View 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


+ 11
- 0
devel/lpc21isp/patches/110-bzero.patch View File

@ -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__)

+ 12
- 0
devel/lpc21isp/patches/120-nanosleep.patch View File

@ -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

Loading…
Cancel
Save