To return an error code, we need ssize_t.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
#include <config.h>
+#include <stddef.h>
+#include <sys/types.h>
+
#ident "$Id$"
#include "strlcpy.h"
-extern inline size_t strlcpy_(char *restrict dst, const char *restrict src,
+extern inline ssize_t strlcpy_(char *restrict dst, const char *restrict src,
size_t size);
#include <stddef.h>
#include <string.h>
+#include <sys/types.h>
#include "sizeof.h"
#define STRLCPY(dst, src) strlcpy_(dst, src, SIZEOF_ARRAY(dst))
-inline size_t strlcpy_(char *restrict dst, const char *restrict src,
+inline ssize_t strlcpy_(char *restrict dst, const char *restrict src,
size_t size);
-inline size_t
+inline ssize_t
strlcpy_(char *restrict dst, const char *restrict src, size_t size)
{
size_t len;