aboutsummaryrefslogtreecommitdiff
path: root/utils/canutils/patches/020-usleep.patch
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-11-17 22:05:24 -0800
committerRosen Penev <rosenp@gmail.com>2020-11-19 16:17:42 -0800
commit66191f481e539bae8f883d506b1d2f4d80c84231 (patch)
tree6eb492fce9103444d0daa73f7c7c484eb3530e9c /utils/canutils/patches/020-usleep.patch
parentbc5d02e242f28c3cde66b7857a9f2564234df422 (diff)
canutils: update to 2020.11.0
Renamed j* tools to their new versions. Remove upstreamed patches. Add missing time.h header. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'utils/canutils/patches/020-usleep.patch')
-rw-r--r--utils/canutils/patches/020-usleep.patch85
1 files changed, 0 insertions, 85 deletions
diff --git a/utils/canutils/patches/020-usleep.patch b/utils/canutils/patches/020-usleep.patch
deleted file mode 100644
index 4feb5b8fa..000000000
--- a/utils/canutils/patches/020-usleep.patch
+++ /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) {