From: Dario Binacchi Date: Fri, 8 Apr 2022 10:36:33 +0000 (+0200) Subject: coregrind: fix compilation for uclibc X-Git-Tag: VALGRIND_3_20_0~102 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c9fd9ae24b45f915f0759d32f662835c26d37c3;p=thirdparty%2Fvalgrind.git coregrind: fix compilation for uclibc It fixes a known iusse whose details are described at [1] and more generally it guarantees that Valgrind is properly compiled for ulibc. [1] https://www.mail-archive.com/valgrind-users@lists.sourceforge.net/msg05295.html Suggested-by Michael Trimarchi Co-developed-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- diff --git a/configure.ac b/configure.ac index 6f51dfd9f8..c627a9c17a 100755 --- a/configure.ac +++ b/configure.ac @@ -1204,6 +1204,8 @@ AC_SUBST(DEFAULT_SUPP) AC_CHECK_HEADER([features.h]) if test x$ac_cv_header_features_h = xyes; then + AC_DEFINE([HAVE_HEADER_FEATURES_H], 1, + [Define to 1 if you have the `features.h' header.]) rm -f conftest.$ac_ext cat <<_ACEOF >conftest.$ac_ext #include diff --git a/coregrind/m_debuginfo/minilzo-inl.c b/coregrind/m_debuginfo/minilzo-inl.c index 153d008fd4..b45ec92eaa 100644 --- a/coregrind/m_debuginfo/minilzo-inl.c +++ b/coregrind/m_debuginfo/minilzo-inl.c @@ -1875,6 +1875,10 @@ extern "C" { #endif +#ifdef HAVE_HEADER_FEATURES_H +#include +#endif + #undef LZO_HAVE_CONFIG_H #include "minilzo.h" diff --git a/coregrind/vg_preloaded.c b/coregrind/vg_preloaded.c index 5e20983908..3809811aed 100644 --- a/coregrind/vg_preloaded.c +++ b/coregrind/vg_preloaded.c @@ -45,6 +45,10 @@ #include "pub_core_debuginfo.h" // Needed for pub_core_redir.h #include "pub_core_redir.h" // For VG_NOTIFY_ON_LOAD +#ifdef HAVE_HEADER_FEATURES_H +#include +#endif + #if defined(VGO_linux) || defined(VGO_solaris) || defined(VGO_freebsd) /* ---------------------------------------------------------------------