lib: include strutils.h for mempcpy()
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@gmail.com>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
This commit is contained in:
parent
cc2d3c52bc
commit
ab753d8fee
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include "c.h"
|
||||
#include "mbsalign.h"
|
||||
#include "strutils.h"
|
||||
#include "widechar.h"
|
||||
|
||||
#ifdef HAVE_WIDECHAR
|
||||
|
|
Loading…
Reference in New Issue