diff options
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | qmerge.c | 11 |
2 files changed, 20 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 0efdf3ec..989a34fd 100644 --- a/configure.ac +++ b/configure.ac @@ -18,6 +18,16 @@ AM_PROG_AR LT_INIT AC_SUBST([LIBTOOL_DEPS]) +headers='#ifdef HAVE_STDDEF_H +#include <stddef.h> +#endif +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +' +AC_CHECK_HEADERS([stddef.h unistd.h]) +AC_COMPILE_CHECK_SIZEOF([size_t], [${headers}]) + AC_CHECK_FUNCS_ONCE(m4_flatten([ fmemopen scandirat @@ -1191,8 +1191,17 @@ pkg_merge(int level, const depend_atom *atom, const struct pkg_t *pkg) * --long=xx where xx>27. The option is "safe" in the sense * that not more memory is allocated than what is really * needed to decompress the file. See - * https://bugs.gentoo.org/show_bug.cgi?id=634980 */ + * https://bugs.gentoo.org/show_bug.cgi?id=634980, + * however, on 32-bits arches this yields an parameter + * out of bound error: + * https://bugs.gentoo.org/show_bug.cgi?id=710444 + * https://bugs.gentoo.org/show_bug.cgi?id=754102 + * so only do this on 64-bits systems */ +#if SIZEOF_SIZE_T >= 8 compr = "zstd --long=31 -dc"; +#else + compr = "zstd -dc"; +#endif /* If really tar -I would be used we would have to quote: * compr = "I \"zstd --long=31\""; * But actually we use a pipe (see below) */ |