Fix Solaris 10 build: use lttng_strnlen() wrapper
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 19 May 2016 22:16:48 +0000 (18:16 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 19 May 2016 22:17:43 +0000 (18:17 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/macros.h

index 9304388554d0af82e61ab6ae2e0abddca933960d..0e11d3c7ac2f8179ea98bda74293c91158d6b2c2 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <stdlib.h>
 #include <string.h>
+#include <common/compat/string.h>
 
 /*
  * Takes a pointer x and transform it so we can use it to access members
@@ -87,7 +88,7 @@ void *zmalloc(size_t len)
 static inline
 int lttng_strncpy(char *dst, const char *src, size_t dst_len)
 {
-       if (strnlen(src, dst_len) == dst_len) {
+       if (lttng_strnlen(src, dst_len) == dst_len) {
                /* Fail since copying would result in truncation. */
                return -1;
        }
This page took 0.0266 seconds and 4 git commands to generate.