diff options
author | Denys Vlasenko | 2015-02-02 03:51:47 +0100 |
---|---|---|
committer | Denys Vlasenko | 2015-02-02 03:51:47 +0100 |
commit | 5104645cf87f8cf37c42666c90bb259011cfac58 (patch) | |
tree | 248d2634fdc3d5e6fc6743b3277ed2d55a7cffc5 | |
parent | 07fa09a9527b7c9f864799c4c1cab86b49f232ce (diff) | |
download | busybox-5104645cf87f8cf37c42666c90bb259011cfac58.zip busybox-5104645cf87f8cf37c42666c90bb259011cfac58.tar.gz |
platform.h: enable mempcpy for FreeBSD
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | include/platform.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/platform.h b/include/platform.h index 1168a34..0b0fce1 100644 --- a/include/platform.h +++ b/include/platform.h @@ -451,7 +451,8 @@ typedef unsigned smalluint; #endif #if defined(__FreeBSD__) -//# undef HAVE_MEMPCPY - not yet confirmed +/* users say mempcpy is not present in FreeBSD 9.x */ +# undef HAVE_MEMPCPY # undef HAVE_CLEARENV # undef HAVE_FDATASYNC # undef HAVE_MNTENT_H @@ -517,6 +518,10 @@ extern char *stpcpy(char *p, const char *to_add) FAST_FUNC; #ifndef HAVE_MEMPCPY #include <string.h> +/* In case we are wrong about !HAVE_MEMPCPY, and toolchain _does_ have + * mempcpy(), avoid colliding with it: + */ +#define mempcpy bb__mempcpy static ALWAYS_INLINE void *mempcpy(void *dest, const void *src, size_t len) { return memcpy(dest, src, len) + len; |