From a1446163d584cdc3003c7d5b5fc6d74737c1732d Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Tue, 11 Apr 2017 11:23:05 +0900 Subject: [PATCH] tools: Portability fix for gpgparsemail. * tools/rfc822parse.c (my_stpcpy): Rename from stpcpy. -- When HAVE_STPCPY is not defined (no definition in libc), still, compiler may have definition as a built-in function (for some specific case like second argument is constant). In that case, having stpcpy implementation with the same name but different signature ("static" qualifier) is not good. Signed-off-by: NIIBE Yutaka --- tools/rfc822parse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/rfc822parse.c b/tools/rfc822parse.c index ee81b5d90..412599b63 100644 --- a/tools/rfc822parse.c +++ b/tools/rfc822parse.c @@ -155,7 +155,7 @@ capitalize_header_name (unsigned char *name) #ifndef HAVE_STPCPY static char * -stpcpy (char *a,const char *b) +my_stpcpy (char *a,const char *b) { while (*b) *a++ = *b++; @@ -163,6 +163,7 @@ stpcpy (char *a,const char *b) return (char*)a; } +#define stpcpy my_stpcpy #endif