From 08eb167b40d66da3b4a3a21351a8ed5b99fc3a83 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 24 Mar 2012 11:38:02 -0400 Subject: always build our libelf, as our libdwarf doesn't get along with the system libelf on linux --- libelf/elf_errmsg.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libelf/elf_errmsg.c') diff --git a/libelf/elf_errmsg.c b/libelf/elf_errmsg.c index d6787b1..9fd96bb 100644 --- a/libelf/elf_errmsg.c +++ b/libelf/elf_errmsg.c @@ -69,6 +69,10 @@ elf_errmsg(int error) if (error < 0 || error >= ELF_E_NUM) return _libelf_errors[ELF_E_NUM]; if (oserr) { +#if !HAVE_STRLCPY +# define strlcpy strncpy +# define strlcat(dst, src, len) strcat(dst, src) +#endif strlcpy(LIBELF_PRIVATE(msg), _libelf_errors[error], sizeof(LIBELF_PRIVATE(msg))); strlcat(LIBELF_PRIVATE(msg), ": ", sizeof(LIBELF_PRIVATE(msg))); -- cgit v1.2.3