diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp')
-rw-r--r-- | external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0003-include-missing-time.h-for-time_t.patch | 26 | ||||
-rw-r--r-- | external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0004-Adjust-include-header-sequence-to-avoid-duplicate-de.patch | 36 | ||||
-rw-r--r-- | external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/time_t_maybe_long_long.patch | 135 | ||||
-rw-r--r-- | external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_2.0.bb (renamed from external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_1.8.bb) | 7 |
4 files changed, 138 insertions, 66 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0003-include-missing-time.h-for-time_t.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0003-include-missing-time.h-for-time_t.patch deleted file mode 100644 index 96163f65..00000000 --- a/external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0003-include-missing-time.h-for-time_t.patch +++ /dev/null @@ -1,26 +0,0 @@ -From b36cafdbcbe2193f5b669e703c608e19e23f80a3 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 15 Jul 2017 11:16:42 -0700 -Subject: [PATCH 3/4] include missing time.h for time_t - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - util.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/util.h b/util.h -index e912f19..3c634c1 100644 ---- a/util.h -+++ b/util.h -@@ -22,7 +22,7 @@ - - #include "ddt.h" - #include "ether.h" -- -+#include <time.h> - /** - * Table of human readable strings, one for each port state. - */ --- -2.13.3 - diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0004-Adjust-include-header-sequence-to-avoid-duplicate-de.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0004-Adjust-include-header-sequence-to-avoid-duplicate-de.patch deleted file mode 100644 index e6992751..00000000 --- a/external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/0004-Adjust-include-header-sequence-to-avoid-duplicate-de.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 3cd28aa771934d9165ff0d7e19932cde65de3e52 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 15 Jul 2017 11:16:57 -0700 -Subject: [PATCH 4/4] Adjust include header sequence to avoid duplicate - definitions on musl - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - raw.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/raw.c b/raw.c -index f51c829..494ea7f 100644 ---- a/raw.c -+++ b/raw.c -@@ -18,8 +18,6 @@ - */ - #include <errno.h> - #include <fcntl.h> --#include <linux/filter.h> --#include <linux/if_ether.h> - #include <net/ethernet.h> - #include <net/if.h> - #include <netinet/in.h> -@@ -32,6 +30,8 @@ - #include <sys/types.h> - #include <unistd.h> - -+#include <linux/filter.h> -+#include <linux/if_ether.h> - #include <linux/errqueue.h> - #include <linux/net_tstamp.h> - #include <linux/sockios.h> --- -2.13.3 - diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/time_t_maybe_long_long.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/time_t_maybe_long_long.patch new file mode 100644 index 00000000..af99d2b7 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp/time_t_maybe_long_long.patch @@ -0,0 +1,135 @@ +Fix printf if time_t is long long + +On some platforms, time_t has recently switched from "long" to "long +long" [1]. For these platforms it is necessary to use "%lld" as printf +format specifier because the ABI differs between "long" and "long long". + +I found no way for creating something similar to PRId64 for time_t. No +idea how to determine whether it's "long" or "long long". So I cast +everything to "long long" instead. + +[1] https://git.musl-libc.org/cgit/musl/commit/?id=38143339646a4ccce8afe298c34467767c899f51 + +Upstream-Status: Accepted [next version is after 2.0] +Upstream-Patch: https://github.com/richardcochran/linuxptp/commit/7de73fefc378cc42b9ed1115b3afa409d0250a48 + +Signed-off-by: Christian Eggers <ceggers@arri.de> +--- +diff -Naur linuxptp-2.0.org/phc_ctl.c linuxptp-2.0/phc_ctl.c +--- linuxptp-2.0.org/phc_ctl.c 2018-08-12 23:08:43.000000000 +0200 ++++ linuxptp-2.0/phc_ctl.c 2020-05-29 21:34:26.166519963 +0200 +@@ -230,8 +230,8 @@ + strerror(errno)); + return -1; + } else { +- pr_notice("set clock time to %ld.%09ld or %s", +- ts.tv_sec, ts.tv_nsec, ctime(&ts.tv_sec)); ++ pr_notice("set clock time to %lld.%09ld or %s", ++ (long long)ts.tv_sec, ts.tv_nsec, ctime(&ts.tv_sec)); + } + + return args_to_eat; +@@ -248,8 +248,8 @@ + + return -1; + } else { +- pr_notice("clock time is %ld.%09lu or %s", +- ts.tv_sec, ts.tv_nsec, ctime(&ts.tv_sec)); ++ pr_notice("clock time is %lld.%09lu or %s", ++ (long long)ts.tv_sec, ts.tv_nsec, ctime(&ts.tv_sec)); + } + + /* get operation does not require any arguments */ +diff -Naur linuxptp-2.0.org/print.c linuxptp-2.0/print.c +--- linuxptp-2.0.org/print.c 2018-08-12 23:08:43.000000000 +0200 ++++ linuxptp-2.0/print.c 2020-05-29 21:34:26.166519963 +0200 +@@ -73,16 +73,16 @@ + + if (verbose) { + f = level >= LOG_NOTICE ? stdout : stderr; +- fprintf(f, "%s[%ld.%03ld]: %s%s%s\n", ++ fprintf(f, "%s[%lld.%03ld]: %s%s%s\n", + progname ? progname : "", +- ts.tv_sec, ts.tv_nsec / 1000000, ++ (long long)ts.tv_sec, ts.tv_nsec / 1000000, + message_tag ? message_tag : "", message_tag ? " " : "", + buf); + fflush(f); + } + if (use_syslog) { +- syslog(level, "[%ld.%03ld] %s%s%s", +- ts.tv_sec, ts.tv_nsec / 1000000, ++ syslog(level, "[%lld.%03ld] %s%s%s", ++ (long long)ts.tv_sec, ts.tv_nsec / 1000000, + message_tag ? message_tag : "", message_tag ? " " : "", + buf); + } +diff -Naur linuxptp-2.0.org/unicast_service.c linuxptp-2.0/unicast_service.c +--- linuxptp-2.0.org/unicast_service.c 2018-08-12 23:08:43.000000000 +0200 ++++ linuxptp-2.0/unicast_service.c 2020-05-29 21:36:23.170497415 +0200 +@@ -209,9 +209,9 @@ + tmo = now.tv_sec + req->durationField; + if (tmo > client->grant_tmo) { + client->grant_tmo = tmo; +- pr_debug("%s grant of 0x%x extended to %ld", ++ pr_debug("%s grant of 0x%x extended to %lld", + pid2str(&client->portIdentity), +- client->message_types, tmo); ++ client->message_types, (long long)tmo); + } + } + +@@ -226,8 +226,8 @@ + interval = pqueue_peek(p->unicast_service->queue); + if (interval) { + tmo.it_value = interval->tmo; +- pr_debug("arming timer tmo={%ld,%ld}", +- interval->tmo.tv_sec, interval->tmo.tv_nsec); ++ pr_debug("arming timer tmo={%lld,%ld}", ++ (long long)interval->tmo.tv_sec, interval->tmo.tv_nsec); + } else { + pr_debug("stopping unicast service timer"); + } +@@ -499,8 +499,8 @@ + + while ((interval = pqueue_peek(p->unicast_service->queue)) != NULL) { + +- pr_debug("peek i={2^%d} tmo={%ld,%ld}", interval->log_period, +- interval->tmo.tv_sec, interval->tmo.tv_nsec); ++ pr_debug("peek i={2^%d} tmo={%lld,%ld}", interval->log_period, ++ (long long)interval->tmo.tv_sec, interval->tmo.tv_nsec); + + if (timespec_compare(&now, &interval->tmo) >= 0) { + break; +@@ -519,8 +519,8 @@ + } + + interval_increment(interval); +- pr_debug("next i={2^%d} tmo={%ld,%ld}", interval->log_period, +- interval->tmo.tv_sec, interval->tmo.tv_nsec); ++ pr_debug("next i={2^%d} tmo={%lld,%ld}", interval->log_period, ++ (long long)interval->tmo.tv_sec, interval->tmo.tv_nsec); + pqueue_insert(p->unicast_service->queue, interval); + } + +diff -Naur linuxptp-2.0.org/unicast_client.c linuxptp-2.0/unicast_client.c +--- linuxptp-2.0.org/unicast_client.c 2018-08-12 23:08:43.000000000 +0200 ++++ linuxptp-2.0/unicast_client.c 2020-06-02 11:13:06.922997844 +0200 +@@ -216,7 +216,7 @@ + long duration) + { + struct timespec now; +- long tmo; ++ time_t tmo; + + if (clock_gettime(CLOCK_MONOTONIC, &now)) { + pr_err("clock_gettime failed: %m"); +@@ -226,7 +226,7 @@ + tmo = now.tv_sec + duration; + if (!master->renewal_tmo || tmo < master->renewal_tmo) { + master->renewal_tmo = tmo; +- pr_debug("port %d: renewal timeout at %ld", portnum(p), tmo); ++ pr_debug("port %d: renewal timeout at %lld", portnum(p), (long long)tmo); + } + } + diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_1.8.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_2.0.bb index c7b8b293..930c6673 100644 --- a/external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_1.8.bb +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/linuxptp/linuxptp_2.0.bb @@ -5,12 +5,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" SRC_URI = "http://sourceforge.net/projects/linuxptp/files/v${PV}/linuxptp-${PV}.tgz \ file://build-Allow-CC-and-prefix-to-be-overriden.patch \ file://no-incdefs-using-host-headers.patch \ - file://0003-include-missing-time.h-for-time_t.patch \ - file://0004-Adjust-include-header-sequence-to-avoid-duplicate-de.patch \ + file://time_t_maybe_long_long.patch \ " -SRC_URI[md5sum] = "5688cdfe57932273e1dbf35b3b97b9a0" -SRC_URI[sha256sum] = "fa8e00f6ec73cefa7bb313dce7f60dfe5eb9e2bde3353594e9ac18edc93e5165" +SRC_URI[md5sum] = "d8bb7374943bb747db7786ac26f17f11" +SRC_URI[sha256sum] = "0a24d9401e87d4af023d201e234d91127d82c350daad93432106284aa9459c7d" EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} \ EXTRA_CFLAGS='-D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC ${CFLAGS}'" |