diff options
author | Andrea Adami <andrea.adami@gmail.com> | 2018-05-14 00:17:30 +0200 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2018-05-17 08:32:26 -0700 |
commit | e22a87046f51e40972d732377505e62f9940d874 (patch) | |
tree | c92282737f71711b9cb65cb9f3566f4d46ff5a3a /meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0009-vmcore-dmesg.c-work-around-missing-imaxdiv.patch | |
parent | b4d849f5dbd7c0919e6fc64ece4394dee911e4cd (diff) | |
download | meta-openembedded-contrib-e22a87046f51e40972d732377505e62f9940d874.tar.gz |
kexec-tools-klibc: upgrade from v. 2.0.2 to 2.0.17
This version does support aarch64.
Ad klibc-specific patchset and track the git repository
to get the (many) fixes for the warnings.
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0009-vmcore-dmesg.c-work-around-missing-imaxdiv.patch')
-rw-r--r-- | meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0009-vmcore-dmesg.c-work-around-missing-imaxdiv.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0009-vmcore-dmesg.c-work-around-missing-imaxdiv.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0009-vmcore-dmesg.c-work-around-missing-imaxdiv.patch new file mode 100644 index 0000000000..df980b118e --- /dev/null +++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0009-vmcore-dmesg.c-work-around-missing-imaxdiv.patch @@ -0,0 +1,57 @@ +From ad598a71ffff6f86462211f252ac0c7b5de53869 Mon Sep 17 00:00:00 2001 +From: Andrea Adami <andrea.adami@gmail.com> +Date: Tue, 17 Apr 2018 13:14:12 +0200 +Subject: [PATCH] vmcore-dmesg.c: work around missing imaxdiv() + +Convert to integer arithmetic for klibc. + +Fix + + vmcore-dmesg.c: In function 'dump_dmesg_structured': + vmcore-dmesg.c:578:2: error: unknown type name 'imaxdiv_t' + +Upstream-Status: Inappropriate [klibc specific] +Signed-off-by: Andrea Adami <andrea.adami@gmail.com> + +--- + vmcore-dmesg/vmcore-dmesg.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c +index e340ef4..1b27b71 100644 +--- a/vmcore-dmesg/vmcore-dmesg.c ++++ b/vmcore-dmesg/vmcore-dmesg.c +@@ -575,8 +575,11 @@ static void dump_dmesg_structured(int fd) + ssize_t ret; + char *msg; + uint16_t text_len; ++#ifndef __KLIBC__ + imaxdiv_t imaxdiv_sec, imaxdiv_usec; +- ++#else ++ int64_t imaxdiv_sec, imaxdiv_usec; ++#endif + if (!log_buf_vaddr) { + fprintf(stderr, "Missing the log_buf symbol\n"); + exit(60); +@@ -645,12 +648,20 @@ static void dump_dmesg_structured(int fd) + exit(65); + } + ts_nsec = struct_val_u64(buf, log_offset_ts_nsec); ++#ifndef __KLIBC__ + imaxdiv_sec = imaxdiv(ts_nsec, 1000000000); + imaxdiv_usec = imaxdiv(imaxdiv_sec.rem, 1000); + + len += sprintf(out_buf + len, "[%5llu.%06llu] ", + (long long unsigned int)imaxdiv_sec.quot, + (long long unsigned int)imaxdiv_usec.quot); ++#else ++ imaxdiv_sec = ts_nsec / 1000000000; ++ imaxdiv_usec = (ts_nsec % 1000000000) / 1000; ++ len += sprintf(out_buf + len, "[%5llu.%06llu] ", ++ (long long unsigned int)imaxdiv_sec, ++ (long long unsigned int)imaxdiv_usec); ++#endif + + /* escape non-printable characters */ + text_len = struct_val_u16(buf, log_offset_text_len); |