From b71c3e158370c3df4e241549bf30d269de8b3558 Mon Sep 17 00:00:00 2001 From: tg Date: Tue, 5 Nov 2013 22:10:15 +0000 Subject: [PATCH] some bad OSes use _FORTIFY_LEVEL and break this problem noticed by jonthn --- strlcpy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/strlcpy.c b/strlcpy.c index 53f9130..c0ebfd5 100644 --- a/strlcpy.c +++ b/strlcpy.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006, 2008, 2009 + * Copyright (c) 2006, 2008, 2009, 2013 * Thorsten Glaser * Copyright (c) 1998 Todd C. Miller * @@ -18,13 +18,14 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/strlcpy.c,v 1.7 2009/06/10 18:12:50 tg Rel $"); +__RCSID("$MirOS: src/bin/mksh/strlcpy.c,v 1.8 2013/11/05 22:10:15 tg Exp $"); /* * Copy src to string dst of size siz. At most siz-1 characters * will be copied. Always NUL terminates (unless siz == 0). * Returns strlen(src); if retval >= siz, truncation occurred. */ +#undef strlcpy size_t strlcpy(char *dst, const char *src, size_t siz) {