X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-app.hpp;h=c48e2b9e25b97f95e745b4cbd47d667583c0eb26;hb=11bcbf894cf92b99a2d885cad117db6811f164cb;hp=34376a63df9ded3af5ca1ef0bd26b20a319cb639;hpb=b0f2e8db59fcadc8f4b06a94175792be3c431004;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/ust-app.hpp b/src/bin/lttng-sessiond/ust-app.hpp index 34376a63d..c48e2b9e2 100644 --- a/src/bin/lttng-sessiond/ust-app.hpp +++ b/src/bin/lttng-sessiond/ust-app.hpp @@ -326,19 +326,24 @@ struct ust_app { struct lttng_ht *token_to_event_notifier_rule_ht; }; +/* + * Due to a bug in g++ < 7.1, this specialization must be enclosed in the fmt namespace, + * see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480. + */ +namespace fmt { template <> -struct fmt::formatter : fmt::formatter { +struct formatter : formatter { template typename FormatCtx::iterator format(const ust_app& app, FormatCtx& ctx) { - return fmt::format_to(ctx.out(), + return format_to(ctx.out(), "{{ procname = `{}`, ppid = {}, pid = {}, uid = {}, gid = {}, version = {}.{}, registration time = {} }}", app.name, app.ppid, app.pid, app.uid, app.gid, app.v_major, app.v_minor, lttng::utils::time_to_iso8601_str(app.registration_time)); } }; - +} /* namespace fmt */ #ifdef HAVE_LIBLTTNG_UST_CTL