diff options
Diffstat (limited to 'include')
-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 1168a34dc..0b0fce182 100644 --- a/include/platform.h +++ b/include/platform.h | |||
@@ -451,7 +451,8 @@ typedef unsigned smalluint; | |||
451 | #endif | 451 | #endif |
452 | 452 | ||
453 | #if defined(__FreeBSD__) | 453 | #if defined(__FreeBSD__) |
454 | //# undef HAVE_MEMPCPY - not yet confirmed | 454 | /* users say mempcpy is not present in FreeBSD 9.x */ |
455 | # undef HAVE_MEMPCPY | ||
455 | # undef HAVE_CLEARENV | 456 | # undef HAVE_CLEARENV |
456 | # undef HAVE_FDATASYNC | 457 | # undef HAVE_FDATASYNC |
457 | # undef HAVE_MNTENT_H | 458 | # undef HAVE_MNTENT_H |
@@ -517,6 +518,10 @@ extern char *stpcpy(char *p, const char *to_add) FAST_FUNC; | |||
517 | 518 | ||
518 | #ifndef HAVE_MEMPCPY | 519 | #ifndef HAVE_MEMPCPY |
519 | #include <string.h> | 520 | #include <string.h> |
521 | /* In case we are wrong about !HAVE_MEMPCPY, and toolchain _does_ have | ||
522 | * mempcpy(), avoid colliding with it: | ||
523 | */ | ||
524 | #define mempcpy bb__mempcpy | ||
520 | static ALWAYS_INLINE void *mempcpy(void *dest, const void *src, size_t len) | 525 | static ALWAYS_INLINE void *mempcpy(void *dest, const void *src, size_t len) |
521 | { | 526 | { |
522 | return memcpy(dest, src, len) + len; | 527 | return memcpy(dest, src, len) + len; |