canutils: update to 2020.11.0 13965/head
authorRosen Penev <rosenp@gmail.com>
Wed, 18 Nov 2020 06:05:24 +0000 (22:05 -0800)
committerRosen Penev <rosenp@gmail.com>
Fri, 20 Nov 2020 00:17:42 +0000 (16:17 -0800)
Renamed j* tools to their new versions.

Remove upstreamed patches.

Add missing time.h header.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
utils/canutils/Makefile
utils/canutils/patches/010-bzero.patch [deleted file]
utils/canutils/patches/010-time.patch [new file with mode: 0644]
utils/canutils/patches/020-usleep.patch [deleted file]

index 758dac525907a1471c3dc037b628d2064ce06c34..9bb331dec25b753c5c76ac4379cd98dde9d34ae8 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=canutils
-PKG_VERSION:=2020.02.04
-PKG_RELEASE:=4
+PKG_VERSION:=2020.11.0
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/linux-can/can-utils/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=a766aad89955b9cfcca27f61ef988fa169565c3657d2789808c0f33a7afa23c8
+PKG_HASH:=b8e53081c076fca248c39ae9ae5791359a81f1eb3e5fe23ff6fb0d0e1f1033fa
 PKG_BUILD_DIR:=$(BUILD_DIR)/can-utils-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Anton Glukhov <anton.a.glukhov@gmail.com>
@@ -53,10 +53,9 @@ FILES:= \
        asc2log bcmserver canbusload can-calc-bit-timing \
        candump canfdtest cangen cangw canlogserver canplayer \
        cansend cansniffer isotpdump isotpperf isotprecv isotpsend \
-       isotpserver isotpsniffer isotptun jacd jcat jspy jsr \
+       isotpserver isotpsniffer isotptun j1939acd j1939cat j1939spy j1939sr \
        log2asc log2long slcan_attach slcand slcanpty testj1939
 
-
 $(foreach a,$(FILES),$(eval $(call GenPlugin,$(a))))
 
 define PartInstall
diff --git a/utils/canutils/patches/010-bzero.patch b/utils/canutils/patches/010-bzero.patch
deleted file mode 100644 (file)
index cfeebc6..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-From 8d2ed4c959039abdcfeaa3fe1e70af0e75be8809 Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Sun, 11 Oct 2020 22:02:23 -0700
-Subject: [PATCH] jcat: remove bzero
-
-bzero is removed in POSIX 2008. malloc/bzero can also be replaced with
-calloc.
-
-Signed-off-by: Rosen Penev <rosenp@gmail.com>
----
- jcat.c | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/jcat.c b/jcat.c
-index 8335d6e..81ffe04 100644
---- a/jcat.c
-+++ b/jcat.c
-@@ -644,12 +644,10 @@ int main(int argc, char *argv[])
-       struct jcat_priv *priv;
-       int ret;
--      priv = malloc(sizeof(*priv));
-+      priv = calloc(1, sizeof(*priv));
-       if (!priv)
-               err(EXIT_FAILURE, "can't allocate priv");
--      bzero(priv, sizeof(*priv));
--
-       priv->todo_prio = -1;
-       priv->infile = STDIN_FILENO;
-       priv->outfile = STDOUT_FILENO;
diff --git a/utils/canutils/patches/010-time.patch b/utils/canutils/patches/010-time.patch
new file mode 100644 (file)
index 0000000..503f93e
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/j1939cat.c
++++ b/j1939cat.c
+@@ -13,6 +13,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <time.h>
+ #include <unistd.h>
+ #include <linux/errqueue.h>
diff --git a/utils/canutils/patches/020-usleep.patch b/utils/canutils/patches/020-usleep.patch
deleted file mode 100644 (file)
index 4feb5b8..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-From d7df79e6876bed9df9522255f9d24ad5a76b65ce Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Sun, 11 Oct 2020 22:00:32 -0700
-Subject: [PATCH] convert usleep to nanosleep
-
-usleep is removed in POSIX 2008.
-
-Signed-off-by: Rosen Penev <rosenp@gmail.com>
----
- bcmserver.c    | 7 ++++++-
- canlogserver.c | 6 +++++-
- isotpserver.c  | 7 ++++++-
- 3 files changed, 17 insertions(+), 3 deletions(-)
-
-diff --git a/bcmserver.c b/bcmserver.c
-index b51cb2c..3fe092c 100644
---- a/bcmserver.c
-+++ b/bcmserver.c
-@@ -114,6 +114,7 @@
- #include <string.h>
- #include <signal.h>
- #include <errno.h>
-+#include <time.h>
- #include <sys/types.h>
- #include <sys/wait.h>
-@@ -180,8 +181,12 @@ int main(void)
-       saddr.sin_port = htons(PORT);
-       while(bind(sl,(struct sockaddr*)&saddr, sizeof(saddr)) < 0) {
-+              struct timespec f = {
-+                      .tv_nsec = 100 * 1000 * 1000,
-+              };
-+
-               printf(".");fflush(NULL);
--              usleep(100000);
-+              nanosleep(&f, NULL);
-       }
-       if (listen(sl,3) != 0) {
-diff --git a/canlogserver.c b/canlogserver.c
-index 4bcf991..ef338d1 100644
---- a/canlogserver.c
-+++ b/canlogserver.c
-@@ -280,8 +280,12 @@ int main(int argc, char **argv)
-       inaddr.sin_port = htons(port);
-       while(bind(socki, (struct sockaddr*)&inaddr, sizeof(inaddr)) < 0) {
-+              struct timespec f = {
-+                      .tv_nsec = 100 * 1000 * 1000,
-+              };
-+
-               printf(".");fflush(NULL);
--              usleep(100000);
-+              nanosleep(&f, NULL);
-       }
-       if (listen(socki, 3) != 0) {
-diff --git a/isotpserver.c b/isotpserver.c
-index 91719f0..946169e 100644
---- a/isotpserver.c
-+++ b/isotpserver.c
-@@ -64,6 +64,7 @@
- #include <string.h>
- #include <signal.h>
- #include <errno.h>
-+#include <time.h>
- #include <sys/types.h>
- #include <sys/wait.h>
-@@ -298,9 +299,13 @@ int main(int argc, char **argv)
-       saddr.sin_port = htons(local_port);
-       while(bind(sl,(struct sockaddr*)&saddr, sizeof(saddr)) < 0) {
-+              struct timespec f = {
-+                      .tv_nsec = 100 * 1000 * 1000,
-+              };
-+
-               printf(".");
-               fflush(NULL);
--              usleep(100000);
-+              nanosleep(&f, NULL);
-       }
-       if (listen(sl, 3) != 0) {