From 2cd26ef1c27a1b1504aacfe814e89a17c9e88d9e Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Fri, 3 Dec 2021 14:25:06 -0500 Subject: [PATCH] libtraceevent: Fix compiler warnings re: asprintf --- src/libtraceevent/src/event-parse.c | 4 ++++ src/libtraceevent/src/event-plugin.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/libtraceevent/src/event-parse.c b/src/libtraceevent/src/event-parse.c index d54a740f..bab75cb3 100644 --- a/src/libtraceevent/src/event-parse.c +++ b/src/libtraceevent/src/event-parse.c @@ -29,6 +29,10 @@ extern char *strtok_r(char *str, const char *delim, char **saveptr); #define s6_addr32 __u6_addr.__u6_addr32 #endif /* __APPLE__ */ #endif /* _WIN32 */ + +/* gpuvis change! See gpuvis_utils.cpp */ +int asprintf(char **str, const char *fmt, ...); + #include "event-parse.h" #include "event-parse-local.h" diff --git a/src/libtraceevent/src/event-plugin.c b/src/libtraceevent/src/event-plugin.c index 6e8e45b7..3a7eb8d8 100644 --- a/src/libtraceevent/src/event-plugin.c +++ b/src/libtraceevent/src/event-plugin.c @@ -23,6 +23,9 @@ #include "event-utils.h" #include "trace-seq.h" +/* gpuvis change! See gpuvis_utils.cpp */ +int asprintf(char **str, const char *fmt, ...); + #define LOCAL_PLUGIN_DIR ".local/lib/traceevent/plugins/" static struct registered_plugin_options {