]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
coregrind: fix compilation for uclibc
authorDario Binacchi <dario.binacchi@amarulasolutions.com>
Fri, 8 Apr 2022 10:36:33 +0000 (12:36 +0200)
committerMark Wielaard <mark@klomp.org>
Tue, 19 Apr 2022 08:44:07 +0000 (10:44 +0200)
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 <michael@amarulasolutions.com>
Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
configure.ac
coregrind/m_debuginfo/minilzo-inl.c
coregrind/vg_preloaded.c

index 6f51dfd9f8fb558f4532bf7071cabe5942e22b7a..c627a9c17a4a35ff3fa88c5fddf3d4fc0d957f2a 100755 (executable)
@@ -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 <features.h>
index 153d008fd44fdeb30ce9cb113674f8560f898861..b45ec92eaa85599bf9da8cb04f56d7d1a6dcaaa1 100644 (file)
@@ -1875,6 +1875,10 @@ extern "C" {
 
 #endif
 
+#ifdef HAVE_HEADER_FEATURES_H
+#include <features.h>
+#endif
+
 #undef LZO_HAVE_CONFIG_H
 #include "minilzo.h"
 
index 5e2098390847064bd28eee548f22fda415b1dd6c..3809811aede7b0a0e9455caf5c5614b6086a6400 100644 (file)
 #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 <features.h>
+#endif
+
 #if defined(VGO_linux) || defined(VGO_solaris) || defined(VGO_freebsd)
 
 /* ---------------------------------------------------------------------