mirror of
https://github.com/crash-utility/crash
synced 2025-02-22 16:36:48 +00:00
Fix for a compilation error of the new "bpf.c" file when building
on older host systems where CLOCK_BOOTTIME does not exist. (anderson@redhat.com)
This commit is contained in:
parent
23b23ce165
commit
483f98dab7
4
bpf.c
4
bpf.c
@ -1224,6 +1224,7 @@ print_bpf_insn(struct bpf_insn *insn, int allow_ptr_leaks)
|
||||
static void
|
||||
print_boot_time(unsigned long long nsecs, char *buf, unsigned int size)
|
||||
{
|
||||
#ifdef CLOCK_BOOTTIME
|
||||
struct timespec real_time_ts, boot_time_ts;
|
||||
time_t wallclock_secs;
|
||||
struct tm load_tm;
|
||||
@ -1247,4 +1248,7 @@ print_boot_time(unsigned long long nsecs, char *buf, unsigned int size)
|
||||
|
||||
// strftime(buf, size, "%b %d/%H:%M", &load_tm);
|
||||
strftime(buf, size, "%a %b %d %H:%M:%S %Y", &load_tm);
|
||||
#else
|
||||
sprintf(buf, "(unknown)");
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user