From: Jérémie Galarneau Date: Thu, 19 Dec 2019 22:00:49 +0000 (-0500) Subject: Fix: use of strnlen breaks build on Solaris 10 X-Git-Tag: v2.12.0-rc1~169 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a1298db6cf0b806e968d9baa6da08ab78caf460b;p=lttng-tools.git Fix: use of strnlen breaks build on Solaris 10 The new uuid helper library makes use of strnlen directly, which doesn't exist on Solaris 10. Using the compat version solves this. Signed-off-by: Jérémie Galarneau Change-Id: Ie491da37f968fac417e265b5641fdf0dd3298813 --- diff --git a/src/common/uuid.c b/src/common/uuid.c index 68fddc0a2..b0b74c967 100644 --- a/src/common/uuid.c +++ b/src/common/uuid.c @@ -16,6 +16,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include #include #include @@ -43,7 +44,7 @@ int lttng_uuid_from_str(const char *str_in, lttng_uuid uuid_out) goto end; } - if (strnlen(str_in, LTTNG_UUID_STR_LEN) != LTTNG_UUID_STR_LEN - 1) { + if (lttng_strnlen(str_in, LTTNG_UUID_STR_LEN) != LTTNG_UUID_STR_LEN - 1) { ret = -1; goto end; }