X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fversion.c;h=7634f5871a0eaec92e7a4820e36e21c487905aa1;hb=134e72ede7c667571e24f63cd45cdc52e12c7de8;hp=768ebb5e14c030825de7a1d5226bc883b8716658;hpb=456b8d40f14be07cca75a9e22ec77976c895d4d5;p=lttng-tools.git diff --git a/src/bin/lttng/commands/version.c b/src/bin/lttng/commands/version.c index 768ebb5e1..7634f5871 100644 --- a/src/bin/lttng/commands/version.c +++ b/src/bin/lttng/commands/version.c @@ -15,7 +15,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE +#define _LGPL_SOURCE #include #include #include @@ -23,7 +23,6 @@ #include #include #include -#include #include @@ -164,7 +163,8 @@ int cmd_version(int argc, const char **argv) if (lttng_opt_mi) { ret = print_mi(); } else { - MSG("lttng version " VERSION " - " VERSION_NAME " - " GIT_VERSION); + MSG("lttng version " VERSION " - " VERSION_NAME "%s", + GIT_VERSION[0] == '\0' ? "" : " - " GIT_VERSION); MSG("\n" VERSION_DESCRIPTION "\n"); MSG("Web site: http://lttng.org"); MSG("\n%s", lttng_license);