Edit

IABSD.fr/ports/sysutils/lnav/patches/patch-src_ptimec_hh

Branch :

  • Show log

    Commit

  • Author : sthen
    Date : 2025-01-29 16:00:27
    Hash : 43f9c6b7
    Message : sysutils/lnav tweaks: - fix printf format strings and add casts for 64-bit time_t, ok tb - fix sscanf for 64-bit time_t, following a suggestion from tb - set word size/byte-order for sparc64, possibly unbreaking build there

  • sysutils/lnav/patches/patch-src_ptimec_hh
  • Index: src/ptimec.hh
    --- src/ptimec.hh.orig
    +++ src/ptimec.hh
    @@ -331,7 +331,7 @@ ftime_s(char* dst, off_t& off_inout, ssize_t len, cons
     {
         time_t t = tm2sec(&tm.et_tm);
     
    -    snprintf(&dst[off_inout], len - off_inout, "%ld", t);
    +    snprintf(&dst[off_inout], len - off_inout, "%lld", (long long)t);
         off_inout = strlen(dst);
     }
     
    @@ -389,7 +389,7 @@ ftime_q(char* dst, off_t& off_inout, ssize_t len, cons
     {
         time_t t = tm2sec(&tm.et_tm);
     
    -    snprintf(&dst[off_inout], len - off_inout, "%lx", t);
    +    snprintf(&dst[off_inout], len - off_inout, "%llx", (long long)t);
         off_inout = strlen(dst);
     }