Index: b/usr/src/head/string.h =================================================================== --- a/usr/src/head/string.h +++ b/usr/src/head/string.h @@ -137,6 +137,11 @@ extern int strncasecmp(const char *, con extern char *strdup(const char *); #endif +#if defined(__EXTENSIONS__) || defined(_GNU_SOURCE) +#define __mempcpy mempcpy +extern void *mempcpy(void *, const void *, size_t); +#endif + #if defined(__EXTENSIONS__) || \ (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) #if defined(__GNUC__) Index: b/usr/src/lib/libc/amd64/Makefile =================================================================== --- a/usr/src/lib/libc/amd64/Makefile +++ b/usr/src/lib/libc/amd64/Makefile @@ -457,6 +457,7 @@ PORTGEN= \ malloc.o \ memalign.o \ memmem.o \ + mempcpy.o \ mkdev.o \ mkdtemp.o \ mkfifo.o \ Index: b/usr/src/lib/libc/i386/Makefile.com =================================================================== --- a/usr/src/lib/libc/i386/Makefile.com +++ b/usr/src/lib/libc/i386/Makefile.com @@ -490,6 +490,7 @@ PORTGEN= \ malloc.o \ memalign.o \ memmem.o \ + mempcpy.o \ mkdev.o \ mkdtemp.o \ mkfifo.o \ Index: b/usr/src/lib/libc/port/gen/mempcpy.c =================================================================== --- /dev/null +++ b/usr/src/lib/libc/port/gen/mempcpy.c @@ -0,0 +1,8 @@ + +#include + +void * mempcpy(void *dest, const void *src, size_t n) +{ + return (char *)memcpy(dest, src, n) + n; +} + Index: b/usr/src/lib/libc/port/mapfile-vers =================================================================== --- a/usr/src/lib/libc/port/mapfile-vers +++ b/usr/src/lib/libc/port/mapfile-vers @@ -267,6 +267,11 @@ $if lf64 $endif } ILLUMOS_0.3; +SYMBOL_VERSION DYSON_1 { + global: + mempcpy; +} ILLUMOS_0.3; + SYMBOL_VERSION ILLUMOS_0.3 { # Illumos additions protected: assfail3;