Fix: use of strnlen breaks build on Solaris 10
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 19 Dec 2019 22:00:49 +0000 (17:00 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 19 Dec 2019 22:00:49 +0000 (17:00 -0500)
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 <jeremie.galarneau@efficios.com>
Change-Id: Ie491da37f968fac417e265b5641fdf0dd3298813

src/common/uuid.c

index 68fddc0a2ff0089376275b8db80064ad734bc880..b0b74c967ab0cc1e64970708706bb886496dab3e 100644 (file)
@@ -16,6 +16,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include <common/compat/string.h>
 #include <stddef.h>
 #include <stdint.h>
 #include <stdio.h>
@@ -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;
        }
This page took 0.02562 seconds and 4 git commands to generate.