Skip to content

Commit

Permalink
Merge branch 'for-76.1/build-fixes' into pending
Browse files Browse the repository at this point in the history
Fix the include paths for libtraceevent and libtracefs headers to not
explicitly state the {lib}trace{fs,event}/ prefix since that is
determined via pkg-config.

Require a minimum version of json-c for new APIs used by cxl-monitor.
  • Loading branch information
stellarhopper committed Feb 24, 2023
2 parents 82884ee + 21d9a08 commit 96bae09
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions cxl/event_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
// Copyright (C) 2022, Intel Corp. All rights reserved.
#include <stdio.h>
#include <errno.h>
#include <event-parse.h>
#include <json-c/json.h>
#include <util/json.h>
#include <util/util.h>
#include <util/strbuf.h>
#include <ccan/list/list.h>
#include <uuid/uuid.h>
#include <traceevent/event-parse.h>
#include <tracefs/tracefs.h>
#include <tracefs.h>
#include "event_trace.h"

#define _GNU_SOURCE
Expand All @@ -25,7 +25,7 @@ static struct json_object *num_to_json(void *num, int elem_size, unsigned long f
if (sign)
return json_object_new_int64(*(int64_t *)num);
else
return json_object_new_uint64(*(uint64_t *)num);
return util_json_new_u64(*(uint64_t *)num);
}

/* All others fit in a signed 64 bit */
Expand Down Expand Up @@ -98,7 +98,7 @@ static int cxl_event_to_json(struct tep_event *event, struct tep_record *record,
}
json_object_object_add(jevent, "event", jobj);

jobj = json_object_new_uint64(record->ts);
jobj = util_json_new_u64(record->ts);
if (!jobj) {
rc = -ENOMEM;
goto err_jevent;
Expand Down
4 changes: 2 additions & 2 deletions cxl/monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <event-parse.h>
#include <json-c/json.h>
#include <libgen.h>
#include <time.h>
Expand All @@ -16,8 +17,7 @@
#include <util/strbuf.h>
#include <sys/epoll.h>
#include <sys/stat.h>
#include <traceevent/event-parse.h>
#include <tracefs/tracefs.h>
#include <tracefs.h>
#include <cxl/libcxl.h>

/* reuse the core log helpers for the monitor logger */
Expand Down

0 comments on commit 96bae09

Please sign in to comment.