From: Gerlando Falauto Date: Thu, 5 Jan 2012 11:25:29 +0000 (+0100) Subject: lttng-sessiond: do not call ustctl_register_done() X-Git-Tag: v2.0-pre17~33 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=f2ca2e251d8f49b0dbbcca529dd61b3562c1147f;hp=f2ca2e251d8f49b0dbbcca529dd61b3562c1147f lttng-sessiond: do not call ustctl_register_done() When lttng-ust support is not enabled, compilation might fail with: lttng-tools.git/lttng-sessiond/main.c:1167: undefined reference to `ustctl_register_done' Actually when HAVE_LIBLTTNG_UST_CTL is not defined, the function call is normally optimized out by the compiler because ust_app_register() is a static inline alway returning a negative value, leaving the call within unreachable code. Depending on the compiler version and optimization flags, this may however not always happen, leading to the above error. Therefore replace ustctl_register_done() with ustapp_register_done(), which calls the original function when lttng-ust is enabled, and returns an error otherwise (it is unreachable code anyway). Signed-off-by: Gerlando Falauto Signed-off-by: David Goulet ---