From a1298db6cf0b806e968d9baa6da08ab78caf460b Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 19 Dec 2019 17:00:49 -0500 Subject: [PATCH] Fix: use of strnlen breaks build on Solaris 10 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/common/uuid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.34.1