From: Ruediger Meier <ruediger.meier@xxxxxxxxxxx> We have that mempcpy fallback since 2013 (02887b73) but forgot to include it. This fixes a segfault of cal(1) on FreeBSD and OSX. Compiler warning was: lib/mbsalign.c:468:14: warning: implicit declaration of function 'mempcpy' is invalid in C99 [-Wimplicit-function-declaration] dest = mempcpy (dest, str_to_print, min (n_used_bytes, space_left)); ^ lib/mbsalign.c:468:12: warning: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion] dest = mempcpy (dest, str_to_print, min (n_used_bytes, space_left)); CC: Daniel Trebbien <dtrebbien@xxxxxxxxx> Signed-off-by: Ruediger Meier <ruediger.meier@xxxxxxxxxxx> --- lib/mbsalign.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/mbsalign.c b/lib/mbsalign.c index 2a8de2f..f9babba 100644 --- a/lib/mbsalign.c +++ b/lib/mbsalign.c @@ -27,6 +27,7 @@ #include "c.h" #include "mbsalign.h" +#include "strutils.h" #include "widechar.h" #ifdef HAVE_WIDECHAR -- 1.8.4.5 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html