diff options
author | Brad King <brad.king@kitware.com> | 2012-02-10 20:16:06 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-02-10 20:16:06 (GMT) |
commit | ca7790240cf63cd6f449cbde2d8b9866bd22c7d8 (patch) | |
tree | a6cee1cda98072cd7a4bf043d17a8134737f2858 | |
parent | d4a9e334d3d65b2d65097e7c202db52b4a9c0509 (diff) | |
download | CMake-ca7790240cf63cd6f449cbde2d8b9866bd22c7d8.zip CMake-ca7790240cf63cd6f449cbde2d8b9866bd22c7d8.tar.gz CMake-ca7790240cf63cd6f449cbde2d8b9866bd22c7d8.tar.bz2 |
libarchive: Workaround mbsnrtowcs assertion failure on old glibc
The CMake TarTest fails with the error
mbsnrtowcs.c:116: __mbsnrtowcs: Assertion
`status == GCONV_OK || status != GCONV_EMPTY_INPUT ||
status == GCONV_ILLEGAL_INPUT || status == GCONV_INCOMPLETE_INPUT ||
status == GCONV_FULL_OUTPUT' failed.
on very old glibc versions. Work around the problem by pretending that
mbsnrtowcs does not exist. Libarchive will fall back to mbrtowc.
-rw-r--r-- | Utilities/cmlibarchive/libarchive/archive_platform.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_platform.h b/Utilities/cmlibarchive/libarchive/archive_platform.h index ce2f482..cdd9c7c 100644 --- a/Utilities/cmlibarchive/libarchive/archive_platform.h +++ b/Utilities/cmlibarchive/libarchive/archive_platform.h @@ -76,6 +76,11 @@ #define __FBSDID(a) struct _undefined_hack #endif +/* Old glibc mbsnrtowcs fails assertions in our use case. */ +#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ <= 1 +# undef HAVE_MBSNRTOWCS +#endif + /* Try to get standard C99-style integer type definitions. */ #if HAVE_INTTYPES_H #include <inttypes.h> |