This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] string/strncat.c: fix compilation for some architectures
- From: Denis Zaitceff <zaitceff at gmail dot com>
- To: libc-alpha at sourceware dot org
- Date: Fri, 29 Jul 2011 17:48:27 +0600
- Subject: [PATCH] string/strncat.c: fix compilation for some architectures
Since has been changed recently string/strncat.c can't be compiled
anymore for the arch's that have an inline strncat() implementation in
bits/string.h. The reason is that #undef strncat is lost.
My case is x86-32 and s390 must be the case too, but I haven't tested it.
The trivial patch is:
2011-07-29 Denis Zaitceff <zaitceff@gmail.com>
* string/strncat.c (strncat): Undef the symbol in case it has been
defined in bits/string.h.
--- string/strncat.c
+++ string/strncat.c
@@ -25,6 +25,7 @@
#endif
#ifndef STRNCAT
+# undef strncat
# define STRNCAT strncat
#endif