aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/posix/getcwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/posix/getcwd.c')
-rw-r--r--sysdeps/posix/getcwd.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sysdeps/posix/getcwd.c b/sysdeps/posix/getcwd.c
index 01f86ef..2ae3c1e 100644
--- a/sysdeps/posix/getcwd.c
+++ b/sysdeps/posix/getcwd.c
@@ -135,6 +135,11 @@ extern void free ();
# define memmove memcpy
#endif /* Not ANSI_STRING. */
+#ifdef _LIBC
+# define mempcpy __mempcpy
+# define HAVE_MEMPCPY 1
+#endif
+
#if !defined __alloca && !defined __GNU_LIBRARY__
# ifdef __GNUC__
@@ -277,10 +282,10 @@ __getcwd (buf, size)
dotp = &new[dotsize];
}
#ifdef HAVE_MEMPCPY
- *((char *) mempcpy (dotp, new, dotsize)) = '\0';
+ *((char *) mempcpy ((char *) dotp, new, dotsize)) = '\0';
dotsize *= 2;
#else
- memcpy (dotp, new, dotsize);
+ memcpy ((char *) dotp, new, dotsize);
dotsize *= 2;
new[dotsize] = '\0';
#endif